1#![doc = "MAVLink cubepilot dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12 bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32 #[doc = "Do nothing."]
33 ACTUATOR_CONFIGURATION_NONE = 0,
34 #[doc = "Command the actuator to beep now."]
35 ACTUATOR_CONFIGURATION_BEEP = 1,
36 #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37 ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38 #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39 ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40 #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41 ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42 #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43 ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46 pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49 fn default() -> Self {
50 Self::DEFAULT
51 }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62 #[doc = "No function (disabled)."]
63 ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64 #[doc = "Motor 1"]
65 ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66 #[doc = "Motor 2"]
67 ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68 #[doc = "Motor 3"]
69 ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70 #[doc = "Motor 4"]
71 ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72 #[doc = "Motor 5"]
73 ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74 #[doc = "Motor 6"]
75 ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76 #[doc = "Motor 7"]
77 ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78 #[doc = "Motor 8"]
79 ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80 #[doc = "Motor 9"]
81 ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82 #[doc = "Motor 10"]
83 ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84 #[doc = "Motor 11"]
85 ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86 #[doc = "Motor 12"]
87 ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88 #[doc = "Motor 13"]
89 ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90 #[doc = "Motor 14"]
91 ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92 #[doc = "Motor 15"]
93 ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94 #[doc = "Motor 16"]
95 ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96 #[doc = "Servo 1"]
97 ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98 #[doc = "Servo 2"]
99 ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100 #[doc = "Servo 3"]
101 ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102 #[doc = "Servo 4"]
103 ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104 #[doc = "Servo 5"]
105 ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106 #[doc = "Servo 6"]
107 ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108 #[doc = "Servo 7"]
109 ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110 #[doc = "Servo 8"]
111 ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112 #[doc = "Servo 9"]
113 ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114 #[doc = "Servo 10"]
115 ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116 #[doc = "Servo 11"]
117 ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118 #[doc = "Servo 12"]
119 ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120 #[doc = "Servo 13"]
121 ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122 #[doc = "Servo 14"]
123 ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124 #[doc = "Servo 15"]
125 ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126 #[doc = "Servo 16"]
127 ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130 pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133 fn default() -> Self {
134 Self::DEFAULT
135 }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146 #[doc = "Altitude reported from a Baro source using QNH reference"]
147 ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148 #[doc = "Altitude reported from a GNSS source"]
149 ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152 pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155 fn default() -> Self {
156 Self::DEFAULT
157 }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168 ADSB_EMITTER_TYPE_NO_INFO = 0,
169 ADSB_EMITTER_TYPE_LIGHT = 1,
170 ADSB_EMITTER_TYPE_SMALL = 2,
171 ADSB_EMITTER_TYPE_LARGE = 3,
172 ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173 ADSB_EMITTER_TYPE_HEAVY = 5,
174 ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175 ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176 ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177 ADSB_EMITTER_TYPE_GLIDER = 9,
178 ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179 ADSB_EMITTER_TYPE_PARACHUTE = 11,
180 ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181 ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182 ADSB_EMITTER_TYPE_UAV = 14,
183 ADSB_EMITTER_TYPE_SPACE = 15,
184 ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185 ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186 ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187 ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190 pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193 fn default() -> Self {
194 Self::DEFAULT
195 }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199 pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202 fn default() -> Self {
203 Self::DEFAULT
204 }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208 pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211 fn default() -> Self {
212 Self::DEFAULT
213 }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224 #[doc = "Under way using engine."]
225 UNDER_WAY = 0,
226 AIS_NAV_ANCHORED = 1,
227 AIS_NAV_UN_COMMANDED = 2,
228 AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229 AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230 AIS_NAV_MOORED = 5,
231 AIS_NAV_AGROUND = 6,
232 AIS_NAV_FISHING = 7,
233 AIS_NAV_SAILING = 8,
234 AIS_NAV_RESERVED_HSC = 9,
235 AIS_NAV_RESERVED_WIG = 10,
236 AIS_NAV_RESERVED_1 = 11,
237 AIS_NAV_RESERVED_2 = 12,
238 AIS_NAV_RESERVED_3 = 13,
239 #[doc = "Search And Rescue Transponder."]
240 AIS_NAV_AIS_SART = 14,
241 #[doc = "Not available (default)."]
242 AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245 pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248 fn default() -> Self {
249 Self::DEFAULT
250 }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261 #[doc = "Not available (default)."]
262 AIS_TYPE_UNKNOWN = 0,
263 AIS_TYPE_RESERVED_1 = 1,
264 AIS_TYPE_RESERVED_2 = 2,
265 AIS_TYPE_RESERVED_3 = 3,
266 AIS_TYPE_RESERVED_4 = 4,
267 AIS_TYPE_RESERVED_5 = 5,
268 AIS_TYPE_RESERVED_6 = 6,
269 AIS_TYPE_RESERVED_7 = 7,
270 AIS_TYPE_RESERVED_8 = 8,
271 AIS_TYPE_RESERVED_9 = 9,
272 AIS_TYPE_RESERVED_10 = 10,
273 AIS_TYPE_RESERVED_11 = 11,
274 AIS_TYPE_RESERVED_12 = 12,
275 AIS_TYPE_RESERVED_13 = 13,
276 AIS_TYPE_RESERVED_14 = 14,
277 AIS_TYPE_RESERVED_15 = 15,
278 AIS_TYPE_RESERVED_16 = 16,
279 AIS_TYPE_RESERVED_17 = 17,
280 AIS_TYPE_RESERVED_18 = 18,
281 AIS_TYPE_RESERVED_19 = 19,
282 #[doc = "Wing In Ground effect."]
283 AIS_TYPE_WIG = 20,
284 AIS_TYPE_WIG_HAZARDOUS_A = 21,
285 AIS_TYPE_WIG_HAZARDOUS_B = 22,
286 AIS_TYPE_WIG_HAZARDOUS_C = 23,
287 AIS_TYPE_WIG_HAZARDOUS_D = 24,
288 AIS_TYPE_WIG_RESERVED_1 = 25,
289 AIS_TYPE_WIG_RESERVED_2 = 26,
290 AIS_TYPE_WIG_RESERVED_3 = 27,
291 AIS_TYPE_WIG_RESERVED_4 = 28,
292 AIS_TYPE_WIG_RESERVED_5 = 29,
293 AIS_TYPE_FISHING = 30,
294 AIS_TYPE_TOWING = 31,
295 #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296 AIS_TYPE_TOWING_LARGE = 32,
297 #[doc = "Dredging or other underwater ops."]
298 AIS_TYPE_DREDGING = 33,
299 AIS_TYPE_DIVING = 34,
300 AIS_TYPE_MILITARY = 35,
301 AIS_TYPE_SAILING = 36,
302 AIS_TYPE_PLEASURE = 37,
303 AIS_TYPE_RESERVED_20 = 38,
304 AIS_TYPE_RESERVED_21 = 39,
305 #[doc = "High Speed Craft."]
306 AIS_TYPE_HSC = 40,
307 AIS_TYPE_HSC_HAZARDOUS_A = 41,
308 AIS_TYPE_HSC_HAZARDOUS_B = 42,
309 AIS_TYPE_HSC_HAZARDOUS_C = 43,
310 AIS_TYPE_HSC_HAZARDOUS_D = 44,
311 AIS_TYPE_HSC_RESERVED_1 = 45,
312 AIS_TYPE_HSC_RESERVED_2 = 46,
313 AIS_TYPE_HSC_RESERVED_3 = 47,
314 AIS_TYPE_HSC_RESERVED_4 = 48,
315 AIS_TYPE_HSC_UNKNOWN = 49,
316 AIS_TYPE_PILOT = 50,
317 #[doc = "Search And Rescue vessel."]
318 AIS_TYPE_SAR = 51,
319 AIS_TYPE_TUG = 52,
320 AIS_TYPE_PORT_TENDER = 53,
321 #[doc = "Anti-pollution equipment."]
322 AIS_TYPE_ANTI_POLLUTION = 54,
323 AIS_TYPE_LAW_ENFORCEMENT = 55,
324 AIS_TYPE_SPARE_LOCAL_1 = 56,
325 AIS_TYPE_SPARE_LOCAL_2 = 57,
326 AIS_TYPE_MEDICAL_TRANSPORT = 58,
327 #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328 AIS_TYPE_NONECOMBATANT = 59,
329 AIS_TYPE_PASSENGER = 60,
330 AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331 AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332 AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333 AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334 AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335 AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336 AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337 AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338 AIS_TYPE_PASSENGER_UNKNOWN = 69,
339 AIS_TYPE_CARGO = 70,
340 AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341 AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342 AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343 AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344 AIS_TYPE_CARGO_RESERVED_1 = 75,
345 AIS_TYPE_CARGO_RESERVED_2 = 76,
346 AIS_TYPE_CARGO_RESERVED_3 = 77,
347 AIS_TYPE_CARGO_RESERVED_4 = 78,
348 AIS_TYPE_CARGO_UNKNOWN = 79,
349 AIS_TYPE_TANKER = 80,
350 AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351 AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352 AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353 AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354 AIS_TYPE_TANKER_RESERVED_1 = 85,
355 AIS_TYPE_TANKER_RESERVED_2 = 86,
356 AIS_TYPE_TANKER_RESERVED_3 = 87,
357 AIS_TYPE_TANKER_RESERVED_4 = 88,
358 AIS_TYPE_TANKER_UNKNOWN = 89,
359 AIS_TYPE_OTHER = 90,
360 AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361 AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362 AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363 AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364 AIS_TYPE_OTHER_RESERVED_1 = 95,
365 AIS_TYPE_OTHER_RESERVED_2 = 96,
366 AIS_TYPE_OTHER_RESERVED_3 = 97,
367 AIS_TYPE_OTHER_RESERVED_4 = 98,
368 AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371 pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374 fn default() -> Self {
375 Self::DEFAULT
376 }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380 pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383 fn default() -> Self {
384 Self::DEFAULT
385 }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE. Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396 #[doc = "Autotune roll axis."]
397 AUTOTUNE_AXIS_ROLL = 1,
398 #[doc = "Autotune pitch axis."]
399 AUTOTUNE_AXIS_PITCH = 2,
400 #[doc = "Autotune yaw axis."]
401 AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404 pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407 fn default() -> Self {
408 Self::DEFAULT
409 }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413 pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416 fn default() -> Self {
417 Self::DEFAULT
418 }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429 #[doc = "Camera is in image/photo capture mode."]
430 CAMERA_MODE_IMAGE = 0,
431 #[doc = "Camera is in video capture mode."]
432 CAMERA_MODE_VIDEO = 1,
433 #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434 CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437 pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440 fn default() -> Self {
441 Self::DEFAULT
442 }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453 #[doc = "Default camera source."]
454 CAMERA_SOURCE_DEFAULT = 0,
455 #[doc = "RGB camera source."]
456 CAMERA_SOURCE_RGB = 1,
457 #[doc = "IR camera source."]
458 CAMERA_SOURCE_IR = 2,
459 #[doc = "NDVI camera source."]
460 CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463 pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466 fn default() -> Self {
467 Self::DEFAULT
468 }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479 #[doc = "Not tracking"]
480 CAMERA_TRACKING_MODE_NONE = 0,
481 #[doc = "Target is a point"]
482 CAMERA_TRACKING_MODE_POINT = 1,
483 #[doc = "Target is a rectangle"]
484 CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487 pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490 fn default() -> Self {
491 Self::DEFAULT
492 }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503 #[doc = "Camera is not tracking"]
504 CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505 #[doc = "Camera is tracking"]
506 CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507 #[doc = "Camera tracking in error state"]
508 CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511 pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514 fn default() -> Self {
515 Self::DEFAULT
516 }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520 pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523 fn default() -> Self {
524 Self::DEFAULT
525 }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536 #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537 ZOOM_TYPE_STEP = 0,
538 #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539 ZOOM_TYPE_CONTINUOUS = 1,
540 #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541 ZOOM_TYPE_RANGE = 2,
542 #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543 ZOOM_TYPE_FOCAL_LENGTH = 3,
544 #[doc = "Zoom value as horizontal field of view in degrees."]
545 ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548 pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551 fn default() -> Self {
552 Self::DEFAULT
553 }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563 CAN_FILTER_REPLACE = 0,
564 CAN_FILTER_ADD = 1,
565 CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568 pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571 fn default() -> Self {
572 Self::DEFAULT
573 }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584 #[doc = "Changes accepted."]
585 CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586 #[doc = "Invalid APN."]
587 CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588 #[doc = "Invalid PIN."]
589 CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590 #[doc = "Changes rejected."]
591 CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592 #[doc = "PUK is required to unblock SIM card."]
593 CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596 pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599 fn default() -> Self {
600 Self::DEFAULT
601 }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612 #[doc = "No error"]
613 CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614 #[doc = "Error state is unknown"]
615 CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616 #[doc = "SIM is required for the modem but missing"]
617 CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618 #[doc = "SIM is available, but not usable for connection"]
619 CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622 pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625 fn default() -> Self {
626 Self::DEFAULT
627 }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638 CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639 CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640 CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641 CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642 CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645 pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648 fn default() -> Self {
649 Self::DEFAULT
650 }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661 #[doc = "State unknown or not reportable."]
662 CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663 #[doc = "Modem is unusable"]
664 CELLULAR_STATUS_FLAG_FAILED = 1,
665 #[doc = "Modem is being initialized"]
666 CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667 #[doc = "Modem is locked"]
668 CELLULAR_STATUS_FLAG_LOCKED = 3,
669 #[doc = "Modem is not enabled and is powered down"]
670 CELLULAR_STATUS_FLAG_DISABLED = 4,
671 #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672 CELLULAR_STATUS_FLAG_DISABLING = 5,
673 #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674 CELLULAR_STATUS_FLAG_ENABLING = 6,
675 #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676 CELLULAR_STATUS_FLAG_ENABLED = 7,
677 #[doc = "Modem is searching for a network provider to register"]
678 CELLULAR_STATUS_FLAG_SEARCHING = 8,
679 #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680 CELLULAR_STATUS_FLAG_REGISTERED = 9,
681 #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682 CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683 #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684 CELLULAR_STATUS_FLAG_CONNECTING = 11,
685 #[doc = "One or more packet data bearers is active and connected"]
686 CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689 pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692 fn default() -> Self {
693 Self::DEFAULT
694 }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705 #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706 COMP_METADATA_TYPE_GENERAL = 0,
707 #[doc = "Parameter meta data."]
708 COMP_METADATA_TYPE_PARAMETER = 1,
709 #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710 COMP_METADATA_TYPE_COMMANDS = 2,
711 #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712 COMP_METADATA_TYPE_PERIPHERALS = 3,
713 #[doc = "Meta data for the events interface."]
714 COMP_METADATA_TYPE_EVENTS = 4,
715 #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716 COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719 pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722 fn default() -> Self {
723 Self::DEFAULT
724 }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735 #[doc = "Traditional PPM ESC."]
736 ESC_CONNECTION_TYPE_PPM = 0,
737 #[doc = "Serial Bus connected ESC."]
738 ESC_CONNECTION_TYPE_SERIAL = 1,
739 #[doc = "One Shot PPM ESC."]
740 ESC_CONNECTION_TYPE_ONESHOT = 2,
741 #[doc = "I2C ESC."]
742 ESC_CONNECTION_TYPE_I2C = 3,
743 #[doc = "CAN-Bus ESC."]
744 ESC_CONNECTION_TYPE_CAN = 4,
745 #[doc = "DShot ESC."]
746 ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749 pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752 fn default() -> Self {
753 Self::DEFAULT
754 }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758 pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761 fn default() -> Self {
762 Self::DEFAULT
763 }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767 pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770 fn default() -> Self {
771 Self::DEFAULT
772 }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783 #[doc = "No failure injected, used to reset a previous failure."]
784 FAILURE_TYPE_OK = 0,
785 #[doc = "Sets unit off, so completely non-responsive."]
786 FAILURE_TYPE_OFF = 1,
787 #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788 FAILURE_TYPE_STUCK = 2,
789 #[doc = "Unit is reporting complete garbage."]
790 FAILURE_TYPE_GARBAGE = 3,
791 #[doc = "Unit is consistently wrong."]
792 FAILURE_TYPE_WRONG = 4,
793 #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794 FAILURE_TYPE_SLOW = 5,
795 #[doc = "Data of unit is delayed in time."]
796 FAILURE_TYPE_DELAYED = 6,
797 #[doc = "Unit is sometimes working, sometimes not."]
798 FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801 pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804 fn default() -> Self {
805 Self::DEFAULT
806 }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817 FAILURE_UNIT_SENSOR_GYRO = 0,
818 FAILURE_UNIT_SENSOR_ACCEL = 1,
819 FAILURE_UNIT_SENSOR_MAG = 2,
820 FAILURE_UNIT_SENSOR_BARO = 3,
821 FAILURE_UNIT_SENSOR_GPS = 4,
822 FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823 FAILURE_UNIT_SENSOR_VIO = 6,
824 FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825 FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826 FAILURE_UNIT_SYSTEM_BATTERY = 100,
827 FAILURE_UNIT_SYSTEM_MOTOR = 101,
828 FAILURE_UNIT_SYSTEM_SERVO = 102,
829 FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830 FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831 FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834 pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837 fn default() -> Self {
838 Self::DEFAULT
839 }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849 #[doc = "No last fence breach"]
850 FENCE_BREACH_NONE = 0,
851 #[doc = "Breached minimum altitude"]
852 FENCE_BREACH_MINALT = 1,
853 #[doc = "Breached maximum altitude"]
854 FENCE_BREACH_MAXALT = 2,
855 #[doc = "Breached fence boundary"]
856 FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859 pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862 fn default() -> Self {
863 Self::DEFAULT
864 }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875 #[doc = "Unknown"]
876 FENCE_MITIGATE_UNKNOWN = 0,
877 #[doc = "No actions being taken"]
878 FENCE_MITIGATE_NONE = 1,
879 #[doc = "Velocity limiting active to prevent breach"]
880 FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883 pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886 fn default() -> Self {
887 Self::DEFAULT
888 }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE. Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2. If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899 #[doc = "Maximum altitude fence"]
900 FENCE_TYPE_ALT_MAX = 1,
901 #[doc = "Circle fence"]
902 FENCE_TYPE_CIRCLE = 2,
903 #[doc = "Polygon fence"]
904 FENCE_TYPE_POLYGON = 4,
905 #[doc = "Minimum altitude fence"]
906 FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909 pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912 fn default() -> Self {
913 Self::DEFAULT
914 }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release. These values indicate the first version or release of this type. For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925 #[doc = "development release"]
926 FIRMWARE_VERSION_TYPE_DEV = 0,
927 #[doc = "alpha release"]
928 FIRMWARE_VERSION_TYPE_ALPHA = 64,
929 #[doc = "beta release"]
930 FIRMWARE_VERSION_TYPE_BETA = 128,
931 #[doc = "release candidate"]
932 FIRMWARE_VERSION_TYPE_RC = 192,
933 #[doc = "official stable release"]
934 FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937 pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940 fn default() -> Self {
941 Self::DEFAULT
942 }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946 pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949 fn default() -> Self {
950 Self::DEFAULT
951 }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955 pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958 fn default() -> Self {
959 Self::DEFAULT
960 }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964 pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967 fn default() -> Self {
968 Self::DEFAULT
969 }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973 pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976 fn default() -> Self {
977 Self::DEFAULT
978 }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982 pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985 fn default() -> Self {
986 Self::DEFAULT
987 }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998 #[doc = "No GPS connected"]
999 GPS_FIX_TYPE_NO_GPS = 0,
1000 #[doc = "No position information, GPS is connected"]
1001 GPS_FIX_TYPE_NO_FIX = 1,
1002 #[doc = "2D position"]
1003 GPS_FIX_TYPE_2D_FIX = 2,
1004 #[doc = "3D position"]
1005 GPS_FIX_TYPE_3D_FIX = 3,
1006 #[doc = "DGPS/SBAS aided 3D position"]
1007 GPS_FIX_TYPE_DGPS = 4,
1008 #[doc = "RTK float, 3D position"]
1009 GPS_FIX_TYPE_RTK_FLOAT = 5,
1010 #[doc = "RTK Fixed, 3D position"]
1011 GPS_FIX_TYPE_RTK_FIXED = 6,
1012 #[doc = "Static fixed, typically used for base stations"]
1013 GPS_FIX_TYPE_STATIC = 7,
1014 #[doc = "PPP, 3D position."]
1015 GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018 pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021 fn default() -> Self {
1022 Self::DEFAULT
1023 }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027 pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030 fn default() -> Self {
1031 Self::DEFAULT
1032 }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043 #[doc = "Gripper release cargo."]
1044 GRIPPER_ACTION_RELEASE = 0,
1045 #[doc = "Gripper grab onto cargo."]
1046 GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049 pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052 fn default() -> Self {
1053 Self::DEFAULT
1054 }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058 pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061 fn default() -> Self {
1062 Self::DEFAULT
1063 }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067 pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070 fn default() -> Self {
1071 Self::DEFAULT
1072 }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076 pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079 fn default() -> Self {
1080 Self::DEFAULT
1081 }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085 pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088 fn default() -> Self {
1089 Self::DEFAULT
1090 }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094 pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097 fn default() -> Self {
1098 Self::DEFAULT
1099 }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110 #[doc = "Illuminator mode is not specified/unknown"]
1111 ILLUMINATOR_MODE_UNKNOWN = 0,
1112 #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113 ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114 #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115 ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118 pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121 fn default() -> Self {
1122 Self::DEFAULT
1123 }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134 #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135 LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136 #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137 LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138 #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139 LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140 #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141 LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144 pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147 fn default() -> Self {
1148 Self::DEFAULT
1149 }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159 MAG_CAL_NOT_STARTED = 0,
1160 MAG_CAL_WAITING_TO_START = 1,
1161 MAG_CAL_RUNNING_STEP_ONE = 2,
1162 MAG_CAL_RUNNING_STEP_TWO = 3,
1163 MAG_CAL_SUCCESS = 4,
1164 MAG_CAL_FAILED = 5,
1165 MAG_CAL_BAD_ORIENTATION = 6,
1166 MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169 pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172 fn default() -> Self {
1173 Self::DEFAULT
1174 }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184 #[doc = "Not a specific reason"]
1185 MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186 #[doc = "Authorizer will send the error as string to GCS"]
1187 MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188 #[doc = "At least one waypoint have a invalid value"]
1189 MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190 #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191 MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192 #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193 MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194 #[doc = "Weather is not good to fly"]
1195 MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198 pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201 fn default() -> Self {
1202 Self::DEFAULT
1203 }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214 #[doc = "Generic autopilot, full support for everything"]
1215 MAV_AUTOPILOT_GENERIC = 0,
1216 #[doc = "Reserved for future use."]
1217 MAV_AUTOPILOT_RESERVED = 1,
1218 #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219 MAV_AUTOPILOT_SLUGS = 2,
1220 #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221 MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222 #[doc = "OpenPilot, <http://openpilot.org>"]
1223 MAV_AUTOPILOT_OPENPILOT = 4,
1224 #[doc = "Generic autopilot only supporting simple waypoints"]
1225 MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226 #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227 MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228 #[doc = "Generic autopilot supporting the full mission command set"]
1229 MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230 #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231 MAV_AUTOPILOT_INVALID = 8,
1232 #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233 MAV_AUTOPILOT_PPZ = 9,
1234 #[doc = "UAV Dev Board"]
1235 MAV_AUTOPILOT_UDB = 10,
1236 #[doc = "FlexiPilot"]
1237 MAV_AUTOPILOT_FP = 11,
1238 #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239 MAV_AUTOPILOT_PX4 = 12,
1240 #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241 MAV_AUTOPILOT_SMACCMPILOT = 13,
1242 #[doc = "AutoQuad -- <http://autoquad.org>"]
1243 MAV_AUTOPILOT_AUTOQUAD = 14,
1244 #[doc = "Armazila -- <http://armazila.com>"]
1245 MAV_AUTOPILOT_ARMAZILA = 15,
1246 #[doc = "Aerob -- <http://aerob.ru>"]
1247 MAV_AUTOPILOT_AEROB = 16,
1248 #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249 MAV_AUTOPILOT_ASLUAV = 17,
1250 #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251 MAV_AUTOPILOT_SMARTAP = 18,
1252 #[doc = "AirRails - <http://uaventure.com>"]
1253 MAV_AUTOPILOT_AIRRAILS = 19,
1254 #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255 MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258 pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261 fn default() -> Self {
1262 Self::DEFAULT
1263 }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274 #[doc = "Low battery state is not provided"]
1275 MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276 #[doc = "Battery is not in low state. Normal operation."]
1277 MAV_BATTERY_CHARGE_STATE_OK = 1,
1278 #[doc = "Battery state is low, warn and monitor close."]
1279 MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280 #[doc = "Battery state is critical, return or abort immediately."]
1281 MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282 #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283 MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284 #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285 MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286 #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287 MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288 #[doc = "Battery is charging."]
1289 MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292 pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295 fn default() -> Self {
1296 Self::DEFAULT
1297 }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301 pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304 fn default() -> Self {
1305 Self::DEFAULT
1306 }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317 #[doc = "Battery function is unknown"]
1318 MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319 #[doc = "Battery supports all flight systems"]
1320 MAV_BATTERY_FUNCTION_ALL = 1,
1321 #[doc = "Battery for the propulsion system"]
1322 MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323 #[doc = "Avionics battery"]
1324 MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325 #[doc = "Payload battery"]
1326 MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329 pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332 fn default() -> Self {
1333 Self::DEFAULT
1334 }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345 #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346 MAV_BATTERY_MODE_UNKNOWN = 0,
1347 #[doc = "Battery is auto discharging (towards storage level)."]
1348 MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349 #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350 MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353 pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356 fn default() -> Self {
1357 Self::DEFAULT
1358 }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369 #[doc = "Not specified."]
1370 MAV_BATTERY_TYPE_UNKNOWN = 0,
1371 #[doc = "Lithium polymer battery"]
1372 MAV_BATTERY_TYPE_LIPO = 1,
1373 #[doc = "Lithium-iron-phosphate battery"]
1374 MAV_BATTERY_TYPE_LIFE = 2,
1375 #[doc = "Lithium-ION battery"]
1376 MAV_BATTERY_TYPE_LION = 3,
1377 #[doc = "Nickel metal hydride battery"]
1378 MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381 pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384 fn default() -> Self {
1385 Self::DEFAULT
1386 }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397 #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398 #[doc = ""]
1399 #[doc = "# Parameters"]
1400 #[doc = ""]
1401 #[doc = "| Parameter | Description | Values | Units |"]
1402 #[doc = "| --------- | ----------- | ------ | ----- |"]
1403 #[doc = "| 1 (Hold) | Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| ≥ 0 | s |"]
1404 #[doc = "| 2 (Accept Radius)| Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached)| ≥ 0 | m |"]
1405 #[doc = "| 3 (Pass Radius)| 0 to pass through the WP, if>0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| | m |"]
1406 #[doc = "| 4 (Yaw) | Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| | deg |"]
1407 #[doc = "| 5 (Latitude)| Latitude | | |"]
1408 #[doc = "| 6 (Longitude)| Longitude | | |"]
1409 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1410 MAV_CMD_NAV_WAYPOINT = 16,
1411 #[doc = "Loiter around this waypoint an unlimited amount of time"]
1412 #[doc = ""]
1413 #[doc = "# Parameters"]
1414 #[doc = ""]
1415 #[doc = "| Parameter | Description | Units |"]
1416 #[doc = "| --------- | ----------- | ----- |"]
1417 #[doc = "| 1 | Empty | |"]
1418 #[doc = "| 2 | Empty | |"]
1419 #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| m |"]
1420 #[doc = "| 4 (Yaw) | Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| deg |"]
1421 #[doc = "| 5 (Latitude)| Latitude | |"]
1422 #[doc = "| 6 (Longitude)| Longitude | |"]
1423 #[doc = "| 7 (Altitude)| Altitude | m |"]
1424 MAV_CMD_NAV_LOITER_UNLIM = 17,
1425 #[doc = "Loiter around this waypoint for X turns"]
1426 #[doc = ""]
1427 #[doc = "# Parameters"]
1428 #[doc = ""]
1429 #[doc = "| Parameter | Description | Values | Units |"]
1430 #[doc = "| --------- | ----------- | ------ | ----- |"]
1431 #[doc = "| 1 (Turns) | Number of turns.| ≥ 0 | |"]
1432 #[doc = "| 2 (Heading Required)| Leave loiter circle only once heading towards the next waypoint (0 = False)| 0, 1 | |"]
1433 #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| | m |"]
1434 #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| | |"]
1435 #[doc = "| 5 (Latitude)| Latitude | | |"]
1436 #[doc = "| 6 (Longitude)| Longitude | | |"]
1437 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1438 MAV_CMD_NAV_LOITER_TURNS = 18,
1439 #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1440 #[doc = ""]
1441 #[doc = "# Parameters"]
1442 #[doc = ""]
1443 #[doc = "| Parameter | Description | Values | Units |"]
1444 #[doc = "| --------- | ----------- | ------ | ----- |"]
1445 #[doc = "| 1 (Time) | Loiter time (only starts once Lat, Lon and Alt is reached).| ≥ 0 | s |"]
1446 #[doc = "| 2 (Heading Required)| Leave loiter circle only once heading towards the next waypoint (0 = False)| 0, 1 | |"]
1447 #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| | m |"]
1448 #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| | |"]
1449 #[doc = "| 5 (Latitude)| Latitude | | |"]
1450 #[doc = "| 6 (Longitude)| Longitude | | |"]
1451 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1452 MAV_CMD_NAV_LOITER_TIME = 19,
1453 #[doc = "Return to launch location"]
1454 #[doc = ""]
1455 #[doc = "# Parameters"]
1456 #[doc = ""]
1457 #[doc = "| Parameter | Description |"]
1458 #[doc = "| --------- | ----------- |"]
1459 #[doc = "| 1 | Empty |"]
1460 #[doc = "| 2 | Empty |"]
1461 #[doc = "| 3 | Empty |"]
1462 #[doc = "| 4 | Empty |"]
1463 #[doc = "| 5 | Empty |"]
1464 #[doc = "| 6 | Empty |"]
1465 #[doc = "| 7 | Empty |"]
1466 MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1467 #[doc = "Land at location."]
1468 #[doc = ""]
1469 #[doc = "# Parameters"]
1470 #[doc = ""]
1471 #[doc = "| Parameter | Description | Values | Units |"]
1472 #[doc = "| --------- | ----------- | ------ | ----- |"]
1473 #[doc = "| 1 (Abort Alt)| Minimum target altitude if landing is aborted (0 = undefined/use system default).| | m |"]
1474 #[doc = "| 2 (Land Mode)| Precision land mode.| [`PrecisionLandMode`] | |"]
1475 #[doc = "| 3 | Empty. | | |"]
1476 #[doc = "| 4 (Yaw Angle)| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| | deg |"]
1477 #[doc = "| 5 (Latitude)| Latitude. | | |"]
1478 #[doc = "| 6 (Longitude)| Longitude. | | |"]
1479 #[doc = "| 7 (Altitude)| Landing altitude (ground level in current frame).| | m |"]
1480 MAV_CMD_NAV_LAND = 21,
1481 #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1482 #[doc = ""]
1483 #[doc = "# Parameters"]
1484 #[doc = ""]
1485 #[doc = "| Parameter | Description | Units |"]
1486 #[doc = "| --------- | ----------- | ----- |"]
1487 #[doc = "| 1 (Pitch) | Minimum pitch (if airspeed sensor present), desired pitch without sensor| deg |"]
1488 #[doc = "| 2 | Empty | |"]
1489 #[doc = "| 3 | Empty | |"]
1490 #[doc = "| 4 (Yaw) | Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| deg |"]
1491 #[doc = "| 5 (Latitude)| Latitude | |"]
1492 #[doc = "| 6 (Longitude)| Longitude | |"]
1493 #[doc = "| 7 (Altitude)| Altitude | m |"]
1494 MAV_CMD_NAV_TAKEOFF = 22,
1495 #[doc = "Land at local position (local frame only)"]
1496 #[doc = ""]
1497 #[doc = "# Parameters"]
1498 #[doc = ""]
1499 #[doc = "| Parameter | Description | Values | Units |"]
1500 #[doc = "| --------- | ----------- | ------ | ----- |"]
1501 #[doc = "| 1 (Target)| Landing target number (if available)| 0, 1, .. | |"]
1502 #[doc = "| 2 (Offset)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| ≥ 0 | m |"]
1503 #[doc = "| 3 (Descend Rate)| Landing descend rate| | m/s |"]
1504 #[doc = "| 4 (Yaw) | Desired yaw angle| | rad |"]
1505 #[doc = "| 5 (Y Position)| Y-axis position| | m |"]
1506 #[doc = "| 6 (X Position)| X-axis position| | m |"]
1507 #[doc = "| 7 (Z Position)| Z-axis / ground level position| | m |"]
1508 MAV_CMD_NAV_LAND_LOCAL = 23,
1509 #[doc = "Takeoff from local position (local frame only)"]
1510 #[doc = ""]
1511 #[doc = "# Parameters"]
1512 #[doc = ""]
1513 #[doc = "| Parameter | Description | Units |"]
1514 #[doc = "| --------- | ----------- | ----- |"]
1515 #[doc = "| 1 (Pitch) | Minimum pitch (if airspeed sensor present), desired pitch without sensor| rad |"]
1516 #[doc = "| 2 | Empty | |"]
1517 #[doc = "| 3 (Ascend Rate)| Takeoff ascend rate| m/s |"]
1518 #[doc = "| 4 (Yaw) | Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| rad |"]
1519 #[doc = "| 5 (Y Position)| Y-axis position| m |"]
1520 #[doc = "| 6 (X Position)| X-axis position| m |"]
1521 #[doc = "| 7 (Z Position)| Z-axis position| m |"]
1522 MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1523 #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1524 #[doc = ""]
1525 #[doc = "# Parameters"]
1526 #[doc = ""]
1527 #[doc = "| Parameter | Description | Values | Units |"]
1528 #[doc = "| --------- | ----------- | ------ | ----- |"]
1529 #[doc = "| 1 (Following)| Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Multiples of 1 | |"]
1530 #[doc = "| 2 (Ground Speed)| Ground speed of vehicle to be followed| | m/s |"]
1531 #[doc = "| 3 (Radius)| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| | m |"]
1532 #[doc = "| 4 (Yaw) | Desired yaw angle.| | deg |"]
1533 #[doc = "| 5 (Latitude)| Latitude | | |"]
1534 #[doc = "| 6 (Longitude)| Longitude | | |"]
1535 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1536 MAV_CMD_NAV_FOLLOW = 25,
1537 #[doc = "Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1538 #[doc = ""]
1539 #[doc = "# Parameters"]
1540 #[doc = ""]
1541 #[doc = "| Parameter | Description | Values | Units |"]
1542 #[doc = "| --------- | ----------- | ------ | ----- |"]
1543 #[doc = "| 1 (Action)| Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| 0, 1, 2 | |"]
1544 #[doc = "| 2 | Empty | | |"]
1545 #[doc = "| 3 | Empty | | |"]
1546 #[doc = "| 4 | Empty | | |"]
1547 #[doc = "| 5 | Empty | | |"]
1548 #[doc = "| 6 | Empty | | |"]
1549 #[doc = "| 7 (Altitude)| Desired altitude| | m |"]
1550 MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1551 #[doc = "Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1552 #[doc = ""]
1553 #[doc = "# Parameters"]
1554 #[doc = ""]
1555 #[doc = "| Parameter | Description | Values | Units |"]
1556 #[doc = "| --------- | ----------- | ------ | ----- |"]
1557 #[doc = "| 1 (Heading Required)| Leave loiter circle only once heading towards the next waypoint (0 = False)| 0, 1 | |"]
1558 #[doc = "| 2 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| | m |"]
1559 #[doc = "| 3 | Empty | | |"]
1560 #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| 0, 1 | |"]
1561 #[doc = "| 5 (Latitude)| Latitude | | |"]
1562 #[doc = "| 6 (Longitude)| Longitude | | |"]
1563 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1564 MAV_CMD_NAV_LOITER_TO_ALT = 31,
1565 #[doc = "Begin following a target"]
1566 #[doc = ""]
1567 #[doc = "# Parameters"]
1568 #[doc = ""]
1569 #[doc = "| Parameter | Description | Values | Units |"]
1570 #[doc = "| --------- | ----------- | ------ | ----- |"]
1571 #[doc = "| 1 (System ID)| System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| 0, 1, .. , 255 | |"]
1572 #[doc = "| 2 | Reserved | | |"]
1573 #[doc = "| 3 | Reserved | | |"]
1574 #[doc = "| 4 (Altitude Mode)| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| 0, 1, 2 | |"]
1575 #[doc = "| 5 (Altitude)| Altitude above home. (used if mode=2)| | m |"]
1576 #[doc = "| 6 | Reserved | | |"]
1577 #[doc = "| 7 (Time to Land)| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| ≥ 0 | s |"]
1578 MAV_CMD_DO_FOLLOW = 32,
1579 #[doc = "Reposition the MAV after a follow target command has been sent"]
1580 #[doc = ""]
1581 #[doc = "# Parameters"]
1582 #[doc = ""]
1583 #[doc = "| Parameter | Description | Units |"]
1584 #[doc = "| --------- | ----------- | ----- |"]
1585 #[doc = "| 1 (Camera Q1)| Camera q1 (where 0 is on the ray from the camera to the tracking device)| |"]
1586 #[doc = "| 2 (Camera Q2)| Camera q2 | |"]
1587 #[doc = "| 3 (Camera Q3)| Camera q3 | |"]
1588 #[doc = "| 4 (Camera Q4)| Camera q4 | |"]
1589 #[doc = "| 5 (Altitude Offset)| altitude offset from target| m |"]
1590 #[doc = "| 6 (X Offset)| X offset from target| m |"]
1591 #[doc = "| 7 (Y Offset)| Y offset from target| m |"]
1592 MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1593 #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1594 #[doc = ""]
1595 #[doc = "# Parameters"]
1596 #[doc = ""]
1597 #[doc = "| Parameter | Description | Values | Units |"]
1598 #[doc = "| --------- | ----------- | ------ | ----- |"]
1599 #[doc = "| 1 (Radius)| Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| | m |"]
1600 #[doc = "| 2 (Velocity)| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| | m/s |"]
1601 #[doc = "| 3 (Yaw Behavior)| Yaw behavior of the vehicle.| [`OrbitYawBehaviour`] | |"]
1602 #[doc = "| 4 (Orbits)| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| ≥ 0 | rad |"]
1603 #[doc = "| 5 (Latitude/X)| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| | |"]
1604 #[doc = "| 6 (Longitude/Y)| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| | |"]
1605 #[doc = "| 7 (Altitude/Z)| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| | |"]
1606 MAV_CMD_DO_ORBIT = 34,
1607 #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1608 #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1609 #[doc = ""]
1610 #[doc = "# Parameters"]
1611 #[doc = ""]
1612 #[doc = "| Parameter | Description | Values |"]
1613 #[doc = "| --------- | ----------- | ------ |"]
1614 #[doc = "| 1 (ROI Mode)| Region of interest mode.| [`MavRoi`] |"]
1615 #[doc = "| 2 (WP Index)| Waypoint index/ target ID. (see MAV_ROI enum)| 0, 1, .. |"]
1616 #[doc = "| 3 (ROI Index)| ROI index (allows a vehicle to manage multiple ROI's)| 0, 1, .. |"]
1617 #[doc = "| 4 | Empty | |"]
1618 #[doc = "| 5 (X) | x the location of the fixed ROI (see MAV_FRAME)| |"]
1619 #[doc = "| 6 (Y) | y | |"]
1620 #[doc = "| 7 (Z) | z | |"]
1621 MAV_CMD_NAV_ROI = 80,
1622 #[doc = "Control autonomous path planning on the MAV."]
1623 #[doc = ""]
1624 #[doc = "# Parameters"]
1625 #[doc = ""]
1626 #[doc = "| Parameter | Description | Values | Units |"]
1627 #[doc = "| --------- | ----------- | ------ | ----- |"]
1628 #[doc = "| 1 (Local Ctrl)| 0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0, 1, 2 | |"]
1629 #[doc = "| 2 (Global Ctrl)| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| 0, 1, .. , 3 | |"]
1630 #[doc = "| 3 | Empty | | |"]
1631 #[doc = "| 4 (Yaw) | Yaw angle at goal| | deg |"]
1632 #[doc = "| 5 (Latitude/X)| Latitude/X of goal| | |"]
1633 #[doc = "| 6 (Longitude/Y)| Longitude/Y of goal| | |"]
1634 #[doc = "| 7 (Altitude/Z)| Altitude/Z of goal| | |"]
1635 MAV_CMD_NAV_PATHPLANNING = 81,
1636 #[doc = "Navigate to waypoint using a spline path."]
1637 #[doc = ""]
1638 #[doc = "# Parameters"]
1639 #[doc = ""]
1640 #[doc = "| Parameter | Description | Values | Units |"]
1641 #[doc = "| --------- | ----------- | ------ | ----- |"]
1642 #[doc = "| 1 (Hold) | Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| ≥ 0 | s |"]
1643 #[doc = "| 2 | Empty | | |"]
1644 #[doc = "| 3 | Empty | | |"]
1645 #[doc = "| 4 | Empty | | |"]
1646 #[doc = "| 5 (Latitude/X)| Latitude/X of goal| | |"]
1647 #[doc = "| 6 (Longitude/Y)| Longitude/Y of goal| | |"]
1648 #[doc = "| 7 (Altitude/Z)| Altitude/Z of goal| | |"]
1649 MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1650 #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1651 #[doc = ""]
1652 #[doc = "# Parameters"]
1653 #[doc = ""]
1654 #[doc = "| Parameter | Description | Values | Units |"]
1655 #[doc = "| --------- | ----------- | ------ | ----- |"]
1656 #[doc = "| 1 | Empty | | |"]
1657 #[doc = "| 2 (Transition Heading)| Front transition heading.| [`VtolTransitionHeading`] | |"]
1658 #[doc = "| 3 | Empty | | |"]
1659 #[doc = "| 4 (Yaw Angle)| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| | deg |"]
1660 #[doc = "| 5 (Latitude)| Latitude | | |"]
1661 #[doc = "| 6 (Longitude)| Longitude | | |"]
1662 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1663 MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1664 #[doc = "Land using VTOL mode"]
1665 #[doc = ""]
1666 #[doc = "# Parameters"]
1667 #[doc = ""]
1668 #[doc = "| Parameter | Description | Values | Units |"]
1669 #[doc = "| --------- | ----------- | ------ | ----- |"]
1670 #[doc = "| 1 (Land Options)| Landing behaviour.| [`NavVtolLandOptions`] | |"]
1671 #[doc = "| 2 | Empty | | |"]
1672 #[doc = "| 3 (Approach Altitude)| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| | m |"]
1673 #[doc = "| 4 (Yaw) | Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| | deg |"]
1674 #[doc = "| 5 (Latitude)| Latitude | | |"]
1675 #[doc = "| 6 (Longitude)| Longitude | | |"]
1676 #[doc = "| 7 (Ground Altitude)| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| | m |"]
1677 MAV_CMD_NAV_VTOL_LAND = 85,
1678 #[doc = "hand control over to an external controller"]
1679 #[doc = ""]
1680 #[doc = "# Parameters"]
1681 #[doc = ""]
1682 #[doc = "| Parameter | Description | Values |"]
1683 #[doc = "| --------- | ----------- | ------ |"]
1684 #[doc = "| 1 (Enable)| On / Off (>0.5f on)| 0, 1 |"]
1685 #[doc = "| 2 | Empty | |"]
1686 #[doc = "| 3 | Empty | |"]
1687 #[doc = "| 4 | Empty | |"]
1688 #[doc = "| 5 | Empty | |"]
1689 #[doc = "| 6 | Empty | |"]
1690 #[doc = "| 7 | Empty | |"]
1691 MAV_CMD_NAV_GUIDED_ENABLE = 92,
1692 #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1693 #[doc = ""]
1694 #[doc = "# Parameters"]
1695 #[doc = ""]
1696 #[doc = "| Parameter | Description | Values | Units |"]
1697 #[doc = "| --------- | ----------- | ------ | ----- |"]
1698 #[doc = "| 1 (Delay) | Delay (-1 to enable time-of-day fields)| -1, 0, .. | s |"]
1699 #[doc = "| 2 (Hour) | hour (24h format, UTC, -1 to ignore)| -1, 0, .. , 23 | |"]
1700 #[doc = "| 3 (Minute)| minute (24h format, UTC, -1 to ignore)| -1, 0, .. , 59 | |"]
1701 #[doc = "| 4 (Second)| second (24h format, UTC, -1 to ignore)| -1, 0, .. , 59 | |"]
1702 #[doc = "| 5 | Empty | | |"]
1703 #[doc = "| 6 | Empty | | |"]
1704 #[doc = "| 7 | Empty | | |"]
1705 MAV_CMD_NAV_DELAY = 93,
1706 #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1707 #[doc = ""]
1708 #[doc = "# Parameters"]
1709 #[doc = ""]
1710 #[doc = "| Parameter | Description | Values | Units |"]
1711 #[doc = "| --------- | ----------- | ------ | ----- |"]
1712 #[doc = "| 1 (Max Descent)| Maximum distance to descend.| ≥ 0 | m |"]
1713 #[doc = "| 2 | Empty | | |"]
1714 #[doc = "| 3 | Empty | | |"]
1715 #[doc = "| 4 | Empty | | |"]
1716 #[doc = "| 5 (Latitude)| Latitude | | |"]
1717 #[doc = "| 6 (Longitude)| Longitude | | |"]
1718 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1719 MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1720 #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1721 #[doc = ""]
1722 #[doc = "# Parameters"]
1723 #[doc = ""]
1724 #[doc = "| Parameter | Description |"]
1725 #[doc = "| --------- | ----------- |"]
1726 #[doc = "| 1 | Empty |"]
1727 #[doc = "| 2 | Empty |"]
1728 #[doc = "| 3 | Empty |"]
1729 #[doc = "| 4 | Empty |"]
1730 #[doc = "| 5 | Empty |"]
1731 #[doc = "| 6 | Empty |"]
1732 #[doc = "| 7 | Empty |"]
1733 MAV_CMD_NAV_LAST = 95,
1734 #[doc = "Delay mission state machine."]
1735 #[doc = ""]
1736 #[doc = "# Parameters"]
1737 #[doc = ""]
1738 #[doc = "| Parameter | Description | Values | Units |"]
1739 #[doc = "| --------- | ----------- | ------ | ----- |"]
1740 #[doc = "| 1 (Delay) | Delay | ≥ 0 | s |"]
1741 #[doc = "| 2 | Empty | | |"]
1742 #[doc = "| 3 | Empty | | |"]
1743 #[doc = "| 4 | Empty | | |"]
1744 #[doc = "| 5 | Empty | | |"]
1745 #[doc = "| 6 | Empty | | |"]
1746 #[doc = "| 7 | Empty | | |"]
1747 MAV_CMD_CONDITION_DELAY = 112,
1748 #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1749 #[doc = ""]
1750 #[doc = "# Parameters"]
1751 #[doc = ""]
1752 #[doc = "| Parameter | Description | Units |"]
1753 #[doc = "| --------- | ----------- | ----- |"]
1754 #[doc = "| 1 (Rate) | Descent / Ascend rate.| m/s |"]
1755 #[doc = "| 2 | Empty | |"]
1756 #[doc = "| 3 | Empty | |"]
1757 #[doc = "| 4 | Empty | |"]
1758 #[doc = "| 5 | Empty | |"]
1759 #[doc = "| 6 | Empty | |"]
1760 #[doc = "| 7 (Altitude)| Target Altitude| m |"]
1761 MAV_CMD_CONDITION_CHANGE_ALT = 113,
1762 #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1763 #[doc = ""]
1764 #[doc = "# Parameters"]
1765 #[doc = ""]
1766 #[doc = "| Parameter | Description | Values | Units |"]
1767 #[doc = "| --------- | ----------- | ------ | ----- |"]
1768 #[doc = "| 1 (Distance)| Distance. | ≥ 0 | m |"]
1769 #[doc = "| 2 | Empty | | |"]
1770 #[doc = "| 3 | Empty | | |"]
1771 #[doc = "| 4 | Empty | | |"]
1772 #[doc = "| 5 | Empty | | |"]
1773 #[doc = "| 6 | Empty | | |"]
1774 #[doc = "| 7 | Empty | | |"]
1775 MAV_CMD_CONDITION_DISTANCE = 114,
1776 #[doc = "Reach a certain target angle."]
1777 #[doc = ""]
1778 #[doc = "# Parameters"]
1779 #[doc = ""]
1780 #[doc = "| Parameter | Description | Values | Units |"]
1781 #[doc = "| --------- | ----------- | ------ | ----- |"]
1782 #[doc = "| 1 (Angle) | target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| 0 .. 360 | deg |"]
1783 #[doc = "| 2 (Angular Speed)| angular speed| ≥ 0 | deg/s |"]
1784 #[doc = "| 3 (Direction)| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| -1, 0, 1 | |"]
1785 #[doc = "| 4 (Relative)| 0: absolute angle, 1: relative offset| 0, 1 | |"]
1786 #[doc = "| 5 | Empty | | |"]
1787 #[doc = "| 6 | Empty | | |"]
1788 #[doc = "| 7 | Empty | | |"]
1789 MAV_CMD_CONDITION_YAW = 115,
1790 #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1791 #[doc = ""]
1792 #[doc = "# Parameters"]
1793 #[doc = ""]
1794 #[doc = "| Parameter | Description |"]
1795 #[doc = "| --------- | ----------- |"]
1796 #[doc = "| 1 | Empty |"]
1797 #[doc = "| 2 | Empty |"]
1798 #[doc = "| 3 | Empty |"]
1799 #[doc = "| 4 | Empty |"]
1800 #[doc = "| 5 | Empty |"]
1801 #[doc = "| 6 | Empty |"]
1802 #[doc = "| 7 | Empty |"]
1803 MAV_CMD_CONDITION_LAST = 159,
1804 #[doc = "Set system mode."]
1805 #[doc = ""]
1806 #[doc = "# Parameters"]
1807 #[doc = ""]
1808 #[doc = "| Parameter | Description | Values |"]
1809 #[doc = "| --------- | ----------- | ------ |"]
1810 #[doc = "| 1 (Mode) | Mode | [`MavMode`] |"]
1811 #[doc = "| 2 (Custom Mode)| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| |"]
1812 #[doc = "| 3 (Custom Submode)| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| |"]
1813 #[doc = "| 4 | Empty | |"]
1814 #[doc = "| 5 | Empty | |"]
1815 #[doc = "| 6 | Empty | |"]
1816 #[doc = "| 7 | Empty | |"]
1817 MAV_CMD_DO_SET_MODE = 176,
1818 #[doc = "Jump to the desired command in the mission list. Repeat this action only the specified number of times"]
1819 #[doc = ""]
1820 #[doc = "# Parameters"]
1821 #[doc = ""]
1822 #[doc = "| Parameter | Description | Values |"]
1823 #[doc = "| --------- | ----------- | ------ |"]
1824 #[doc = "| 1 (Number)| Sequence number| 0, 1, .. |"]
1825 #[doc = "| 2 (Repeat)| Repeat count| 0, 1, .. |"]
1826 #[doc = "| 3 | Empty | |"]
1827 #[doc = "| 4 | Empty | |"]
1828 #[doc = "| 5 | Empty | |"]
1829 #[doc = "| 6 | Empty | |"]
1830 #[doc = "| 7 | Empty | |"]
1831 MAV_CMD_DO_JUMP = 177,
1832 #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1833 #[doc = ""]
1834 #[doc = "# Parameters"]
1835 #[doc = ""]
1836 #[doc = "| Parameter | Description | Values | Units |"]
1837 #[doc = "| --------- | ----------- | ------ | ----- |"]
1838 #[doc = "| 1 (Speed Type)| Speed type of value set in param2 (such as airspeed, ground speed, and so on)| [`SpeedType`] | |"]
1839 #[doc = "| 2 (Speed) | Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| ≥ -2 | m/s |"]
1840 #[doc = "| 3 (Throttle)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| ≥ -2 | % |"]
1841 #[doc = "| 4 | | Reserved (use 0) | |"]
1842 #[doc = "| 5 | | Reserved (use 0) | |"]
1843 #[doc = "| 6 | | Reserved (use 0) | |"]
1844 #[doc = "| 7 | | Reserved (use 0) | |"]
1845 MAV_CMD_DO_CHANGE_SPEED = 178,
1846 #[doc = "Sets the home position to either to the current position or a specified position. The home position is the default position that the system will return to and land on. The position is set automatically by the system during the takeoff (and may also be set using this command). Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1847 #[doc = ""]
1848 #[doc = "# Parameters"]
1849 #[doc = ""]
1850 #[doc = "| Parameter | Description | Values | Units |"]
1851 #[doc = "| --------- | ----------- | ------ | ----- |"]
1852 #[doc = "| 1 (Use Current)| Use current (1=use current location, 0=use specified location)| 0, 1 | |"]
1853 #[doc = "| 2 (Roll) | Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| -180 .. 180 | deg |"]
1854 #[doc = "| 3 (Pitch) | Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| -90 .. 90 | deg |"]
1855 #[doc = "| 4 (Yaw) | Yaw angle. NaN to use default heading. Range: -180..180 degrees.| -180 .. 180 | deg |"]
1856 #[doc = "| 5 (Latitude)| Latitude | | |"]
1857 #[doc = "| 6 (Longitude)| Longitude | | |"]
1858 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1859 MAV_CMD_DO_SET_HOME = 179,
1860 #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1861 #[doc = "Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1862 #[doc = ""]
1863 #[doc = "# Parameters"]
1864 #[doc = ""]
1865 #[doc = "| Parameter | Description | Values |"]
1866 #[doc = "| --------- | ----------- | ------ |"]
1867 #[doc = "| 1 (Number)| Parameter number| 0, 1, .. |"]
1868 #[doc = "| 2 (Value) | Parameter value| |"]
1869 #[doc = "| 3 | Empty | |"]
1870 #[doc = "| 4 | Empty | |"]
1871 #[doc = "| 5 | Empty | |"]
1872 #[doc = "| 6 | Empty | |"]
1873 #[doc = "| 7 | Empty | |"]
1874 MAV_CMD_DO_SET_PARAMETER = 180,
1875 #[doc = "Set a relay to a condition."]
1876 #[doc = ""]
1877 #[doc = "# Parameters"]
1878 #[doc = ""]
1879 #[doc = "| Parameter | Description | Values |"]
1880 #[doc = "| --------- | ----------- | ------ |"]
1881 #[doc = "| 1 (Instance)| Relay instance number.| 0, 1, .. |"]
1882 #[doc = "| 2 (Setting)| Setting. (1=on, 0=off, others possible depending on system hardware)| 0, 1, .. |"]
1883 #[doc = "| 3 | Empty | |"]
1884 #[doc = "| 4 | Empty | |"]
1885 #[doc = "| 5 | Empty | |"]
1886 #[doc = "| 6 | Empty | |"]
1887 #[doc = "| 7 | Empty | |"]
1888 MAV_CMD_DO_SET_RELAY = 181,
1889 #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1890 #[doc = ""]
1891 #[doc = "# Parameters"]
1892 #[doc = ""]
1893 #[doc = "| Parameter | Description | Values | Units |"]
1894 #[doc = "| --------- | ----------- | ------ | ----- |"]
1895 #[doc = "| 1 (Instance)| Relay instance number.| 0, 1, .. | |"]
1896 #[doc = "| 2 (Count) | Cycle count.| 1, 2, .. | |"]
1897 #[doc = "| 3 (Time) | Cycle time. | ≥ 0 | s |"]
1898 #[doc = "| 4 | Empty | | |"]
1899 #[doc = "| 5 | Empty | | |"]
1900 #[doc = "| 6 | Empty | | |"]
1901 #[doc = "| 7 | Empty | | |"]
1902 MAV_CMD_DO_REPEAT_RELAY = 182,
1903 #[doc = "Set a servo to a desired PWM value."]
1904 #[doc = ""]
1905 #[doc = "# Parameters"]
1906 #[doc = ""]
1907 #[doc = "| Parameter | Description | Values | Units |"]
1908 #[doc = "| --------- | ----------- | ------ | ----- |"]
1909 #[doc = "| 1 (Instance)| Servo instance number.| 0, 1, .. | |"]
1910 #[doc = "| 2 (PWM) | Pulse Width Modulation.| 0, 1, .. | us |"]
1911 #[doc = "| 3 | Empty | | |"]
1912 #[doc = "| 4 | Empty | | |"]
1913 #[doc = "| 5 | Empty | | |"]
1914 #[doc = "| 6 | Empty | | |"]
1915 #[doc = "| 7 | Empty | | |"]
1916 MAV_CMD_DO_SET_SERVO = 183,
1917 #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1918 #[doc = ""]
1919 #[doc = "# Parameters"]
1920 #[doc = ""]
1921 #[doc = "| Parameter | Description | Values | Units |"]
1922 #[doc = "| --------- | ----------- | ------ | ----- |"]
1923 #[doc = "| 1 (Instance)| Servo instance number.| 0, 1, .. | |"]
1924 #[doc = "| 2 (PWM) | Pulse Width Modulation.| 0, 1, .. | us |"]
1925 #[doc = "| 3 (Count) | Cycle count.| 1, 2, .. | |"]
1926 #[doc = "| 4 (Time) | Cycle time. | ≥ 0 | s |"]
1927 #[doc = "| 5 | Empty | | |"]
1928 #[doc = "| 6 | Empty | | |"]
1929 #[doc = "| 7 | Empty | | |"]
1930 MAV_CMD_DO_REPEAT_SERVO = 184,
1931 #[doc = "Terminate flight immediately. Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. The vehicle will ignore RC or other input until it has been power-cycled. Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). On multicopters without a parachute it may trigger a crash landing. Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. Support for this command can also be tested by sending the command with param1=0 (<0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1932 #[doc = ""]
1933 #[doc = "# Parameters"]
1934 #[doc = ""]
1935 #[doc = "| Parameter | Description | Values |"]
1936 #[doc = "| --------- | ----------- | ------ |"]
1937 #[doc = "| 1 (Terminate)| Flight termination activated if>0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| 0, 1 |"]
1938 #[doc = "| 2 | Empty | |"]
1939 #[doc = "| 3 | Empty | |"]
1940 #[doc = "| 4 | Empty | |"]
1941 #[doc = "| 5 | Empty | |"]
1942 #[doc = "| 6 | Empty | |"]
1943 #[doc = "| 7 | Empty | |"]
1944 MAV_CMD_DO_FLIGHTTERMINATION = 185,
1945 #[doc = "Change altitude set point."]
1946 #[doc = ""]
1947 #[doc = "# Parameters"]
1948 #[doc = ""]
1949 #[doc = "| Parameter | Description | Values | Units |"]
1950 #[doc = "| --------- | ----------- | ------ | ----- |"]
1951 #[doc = "| 1 (Altitude)| Altitude. | | m |"]
1952 #[doc = "| 2 (Frame) | Frame of new altitude.| [`MavFrame`] | |"]
1953 #[doc = "| 3 | Empty | | |"]
1954 #[doc = "| 4 | Empty | | |"]
1955 #[doc = "| 5 | Empty | | |"]
1956 #[doc = "| 6 | Empty | | |"]
1957 #[doc = "| 7 | Empty | | |"]
1958 MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1959 #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1960 #[doc = ""]
1961 #[doc = "# Parameters"]
1962 #[doc = ""]
1963 #[doc = "| Parameter | Description | Values |"]
1964 #[doc = "| --------- | ----------- | ------ |"]
1965 #[doc = "| 1 (Actuator 1)| Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1966 #[doc = "| 2 (Actuator 2)| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1967 #[doc = "| 3 (Actuator 3)| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1968 #[doc = "| 4 (Actuator 4)| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1969 #[doc = "| 5 (Actuator 5)| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1970 #[doc = "| 6 (Actuator 6)| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1971 #[doc = "| 7 (Index) | Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| 0, 1, .. |"]
1972 MAV_CMD_DO_SET_ACTUATOR = 187,
1973 #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. If specified, the item defines the waypoint at which the return segment starts. If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1974 #[doc = ""]
1975 #[doc = "# Parameters"]
1976 #[doc = ""]
1977 #[doc = "| Parameter | Description | Units |"]
1978 #[doc = "| --------- | ----------- | ----- |"]
1979 #[doc = "| 1 | Empty | |"]
1980 #[doc = "| 2 | Empty | |"]
1981 #[doc = "| 3 | Empty | |"]
1982 #[doc = "| 4 | Empty | |"]
1983 #[doc = "| 5 (Latitude)| Latitudee. 0: not used.| |"]
1984 #[doc = "| 6 (Longitude)| Longitudee. 0: not used.| |"]
1985 #[doc = "| 7 (Altitude)| Altitudee. 0: not used.| m |"]
1986 MAV_CMD_DO_RETURN_PATH_START = 188,
1987 #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern. When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern. It should be followed by a navigation item that defines the first waypoint of the landing sequence. The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded). If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence. \t When sent as a command it triggers a landing using a mission landing pattern. \t The location parameters are not used in this case, and should be set to 0."]
1988 #[doc = ""]
1989 #[doc = "# Parameters"]
1990 #[doc = ""]
1991 #[doc = "| Parameter | Description | Units |"]
1992 #[doc = "| --------- | ----------- | ----- |"]
1993 #[doc = "| 1 | Empty | |"]
1994 #[doc = "| 2 | Empty | |"]
1995 #[doc = "| 3 | Empty | |"]
1996 #[doc = "| 4 | Empty | |"]
1997 #[doc = "| 5 (Latitude)| Latitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| |"]
1998 #[doc = "| 6 (Longitude)| Longitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| |"]
1999 #[doc = "| 7 (Altitude)| Altitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| m |"]
2000 MAV_CMD_DO_LAND_START = 189,
2001 #[doc = "Mission command to perform a landing from a rally point."]
2002 #[doc = ""]
2003 #[doc = "# Parameters"]
2004 #[doc = ""]
2005 #[doc = "| Parameter | Description | Units |"]
2006 #[doc = "| --------- | ----------- | ----- |"]
2007 #[doc = "| 1 (Altitude)| Break altitude| m |"]
2008 #[doc = "| 2 (Speed) | Landing speed| m/s |"]
2009 #[doc = "| 3 | Empty | |"]
2010 #[doc = "| 4 | Empty | |"]
2011 #[doc = "| 5 | Empty | |"]
2012 #[doc = "| 6 | Empty | |"]
2013 #[doc = "| 7 | Empty | |"]
2014 MAV_CMD_DO_RALLY_LAND = 190,
2015 #[doc = "Mission command to safely abort an autonomous landing."]
2016 #[doc = ""]
2017 #[doc = "# Parameters"]
2018 #[doc = ""]
2019 #[doc = "| Parameter | Description | Units |"]
2020 #[doc = "| --------- | ----------- | ----- |"]
2021 #[doc = "| 1 (Altitude)| Altitude | m |"]
2022 #[doc = "| 2 | Empty | |"]
2023 #[doc = "| 3 | Empty | |"]
2024 #[doc = "| 4 | Empty | |"]
2025 #[doc = "| 5 | Empty | |"]
2026 #[doc = "| 6 | Empty | |"]
2027 #[doc = "| 7 | Empty | |"]
2028 MAV_CMD_DO_GO_AROUND = 191,
2029 #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
2030 #[doc = ""]
2031 #[doc = "# Parameters"]
2032 #[doc = ""]
2033 #[doc = "| Parameter | Description | Values | Units |"]
2034 #[doc = "| --------- | ----------- | ------ | ----- |"]
2035 #[doc = "| 1 (Speed) | Ground speed, less than 0 (-1) for default| ≥ -1 | m/s |"]
2036 #[doc = "| 2 (Bitmask)| Bitmask of option flags.| [`MavDoRepositionFlags`] | |"]
2037 #[doc = "| 3 (Radius)| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored.| | m |"]
2038 #[doc = "| 4 (Yaw) | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| | rad |"]
2039 #[doc = "| 5 (Latitude)| Latitude | | |"]
2040 #[doc = "| 6 (Longitude)| Longitude | | |"]
2041 #[doc = "| 7 (Altitude)| Altitude | | m |"]
2042 MAV_CMD_DO_REPOSITION = 192,
2043 #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
2044 #[doc = ""]
2045 #[doc = "# Parameters"]
2046 #[doc = ""]
2047 #[doc = "| Parameter | Description | Values |"]
2048 #[doc = "| --------- | ----------- | ------ |"]
2049 #[doc = "| 1 (Continue)| 0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| 0, 1 |"]
2050 #[doc = "| 2 | Reserved | |"]
2051 #[doc = "| 3 | Reserved | |"]
2052 #[doc = "| 4 | Reserved | |"]
2053 #[doc = "| 5 | Reserved | |"]
2054 #[doc = "| 6 | Reserved | |"]
2055 #[doc = "| 7 | Reserved | |"]
2056 MAV_CMD_DO_PAUSE_CONTINUE = 193,
2057 #[doc = "Set moving direction to forward or reverse."]
2058 #[doc = ""]
2059 #[doc = "# Parameters"]
2060 #[doc = ""]
2061 #[doc = "| Parameter | Description | Values |"]
2062 #[doc = "| --------- | ----------- | ------ |"]
2063 #[doc = "| 1 (Reverse)| Direction (0=Forward, 1=Reverse)| 0, 1 |"]
2064 #[doc = "| 2 | Empty | |"]
2065 #[doc = "| 3 | Empty | |"]
2066 #[doc = "| 4 | Empty | |"]
2067 #[doc = "| 5 | Empty | |"]
2068 #[doc = "| 6 | Empty | |"]
2069 #[doc = "| 7 | Empty | |"]
2070 MAV_CMD_DO_SET_REVERSE = 194,
2071 #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
2072 #[doc = ""]
2073 #[doc = "# Parameters"]
2074 #[doc = ""]
2075 #[doc = "| Parameter | Description | Units |"]
2076 #[doc = "| --------- | ----------- | ----- |"]
2077 #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| |"]
2078 #[doc = "| 2 | Empty | |"]
2079 #[doc = "| 3 | Empty | |"]
2080 #[doc = "| 4 | Empty | |"]
2081 #[doc = "| 5 (Latitude)| Latitude of ROI location| degE7 |"]
2082 #[doc = "| 6 (Longitude)| Longitude of ROI location| degE7 |"]
2083 #[doc = "| 7 (Altitude)| Altitude of ROI location| m |"]
2084 MAV_CMD_DO_SET_ROI_LOCATION = 195,
2085 #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2086 #[doc = ""]
2087 #[doc = "# Parameters"]
2088 #[doc = ""]
2089 #[doc = "| Parameter | Description | Units |"]
2090 #[doc = "| --------- | ----------- | ----- |"]
2091 #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| |"]
2092 #[doc = "| 2 | Empty | |"]
2093 #[doc = "| 3 | Empty | |"]
2094 #[doc = "| 4 | Empty | |"]
2095 #[doc = "| 5 (Pitch Offset)| Pitch offset from next waypoint, positive pitching up| deg |"]
2096 #[doc = "| 6 (Roll Offset)| Roll offset from next waypoint, positive rolling to the right| deg |"]
2097 #[doc = "| 7 (Yaw Offset)| Yaw offset from next waypoint, positive yawing to the right| deg |"]
2098 MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
2099 #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
2100 #[doc = ""]
2101 #[doc = "# Parameters"]
2102 #[doc = ""]
2103 #[doc = "| Parameter | Description |"]
2104 #[doc = "| --------- | ----------- |"]
2105 #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|"]
2106 #[doc = "| 2 | Empty |"]
2107 #[doc = "| 3 | Empty |"]
2108 #[doc = "| 4 | Empty |"]
2109 #[doc = "| 5 | Empty |"]
2110 #[doc = "| 6 | Empty |"]
2111 #[doc = "| 7 | Empty |"]
2112 MAV_CMD_DO_SET_ROI_NONE = 197,
2113 #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2114 #[doc = ""]
2115 #[doc = "# Parameters"]
2116 #[doc = ""]
2117 #[doc = "| Parameter | Description | Values |"]
2118 #[doc = "| --------- | ----------- | ------ |"]
2119 #[doc = "| 1 (System ID)| System ID | 1, 2, .. , 255 |"]
2120 #[doc = "| 2 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| |"]
2121 MAV_CMD_DO_SET_ROI_SYSID = 198,
2122 #[doc = "Control onboard camera system."]
2123 #[doc = ""]
2124 #[doc = "# Parameters"]
2125 #[doc = ""]
2126 #[doc = "| Parameter | Description | Values | Units |"]
2127 #[doc = "| --------- | ----------- | ------ | ----- |"]
2128 #[doc = "| 1 (ID) | Camera ID (-1 for all)| -1, 0, .. | |"]
2129 #[doc = "| 2 (Transmission)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| 0, 1, 2 | |"]
2130 #[doc = "| 3 (Interval)| Transmission mode: 0: video stream,>0: single images every n seconds| ≥ 0 | s |"]
2131 #[doc = "| 4 (Recording)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| 0, 1, 2 | |"]
2132 #[doc = "| 5 | Empty | | |"]
2133 #[doc = "| 6 | Empty | | |"]
2134 #[doc = "| 7 | Empty | | |"]
2135 MAV_CMD_DO_CONTROL_VIDEO = 200,
2136 #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
2137 #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2138 #[doc = ""]
2139 #[doc = "# Parameters"]
2140 #[doc = ""]
2141 #[doc = "| Parameter | Description | Values |"]
2142 #[doc = "| --------- | ----------- | ------ |"]
2143 #[doc = "| 1 (ROI Mode)| Region of interest mode.| [`MavRoi`] |"]
2144 #[doc = "| 2 (WP Index)| Waypoint index/ target ID (depends on param 1).| 0, 1, .. |"]
2145 #[doc = "| 3 (ROI Index)| Region of interest index. (allows a vehicle to manage multiple ROI's)| 0, 1, .. |"]
2146 #[doc = "| 4 | Empty | |"]
2147 #[doc = "| 5 | MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| |"]
2148 #[doc = "| 6 | MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| |"]
2149 #[doc = "| 7 | MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| |"]
2150 MAV_CMD_DO_SET_ROI = 201,
2151 #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2152 #[doc = ""]
2153 #[doc = "# Parameters"]
2154 #[doc = ""]
2155 #[doc = "| Parameter | Description | Values | Units |"]
2156 #[doc = "| --------- | ----------- | ------ | ----- |"]
2157 #[doc = "| 1 (Mode) | Modes: P, TV, AV, M, Etc.| 0, 1, .. | |"]
2158 #[doc = "| 2 (Shutter Speed)| Shutter speed: Divisor number for one second.| 0, 1, .. | |"]
2159 #[doc = "| 3 (Aperture)| Aperture: F stop number.| ≥ 0 | |"]
2160 #[doc = "| 4 (ISO) | ISO number e.g. 80, 100, 200, Etc.| 0, 1, .. | |"]
2161 #[doc = "| 5 (Exposure)| Exposure type enumerator.| | |"]
2162 #[doc = "| 6 (Command Identity)| Command Identity.| | |"]
2163 #[doc = "| 7 (Engine Cut-off)| Main engine cut-off time before camera trigger. (0 means no cut-off)| 0, 1, .. | ds |"]
2164 MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
2165 #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2166 #[doc = ""]
2167 #[doc = "# Parameters"]
2168 #[doc = ""]
2169 #[doc = "| Parameter | Description |"]
2170 #[doc = "| --------- | ----------- |"]
2171 #[doc = "| 1 (Session Control)| Session control e.g. show/hide lens|"]
2172 #[doc = "| 2 (Zoom Absolute)| Zoom's absolute position|"]
2173 #[doc = "| 3 (Zoom Relative)| Zooming step value to offset zoom from the current position|"]
2174 #[doc = "| 4 (Focus) | Focus Locking, Unlocking or Re-locking|"]
2175 #[doc = "| 5 (Shoot Command)| Shooting Command|"]
2176 #[doc = "| 6 (Command Identity)| Command Identity|"]
2177 #[doc = "| 7 (Shot ID)| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.|"]
2178 MAV_CMD_DO_DIGICAM_CONTROL = 203,
2179 #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
2180 #[doc = "Mission command to configure a camera or antenna mount"]
2181 #[doc = ""]
2182 #[doc = "# Parameters"]
2183 #[doc = ""]
2184 #[doc = "| Parameter | Description | Values |"]
2185 #[doc = "| --------- | ----------- | ------ |"]
2186 #[doc = "| 1 (Mode) | Mount operation mode| [`MavMountMode`] |"]
2187 #[doc = "| 2 (Stabilize Roll)| stabilize roll? (1 = yes, 0 = no)| 0, 1 |"]
2188 #[doc = "| 3 (Stabilize Pitch)| stabilize pitch? (1 = yes, 0 = no)| 0, 1 |"]
2189 #[doc = "| 4 (Stabilize Yaw)| stabilize yaw? (1 = yes, 0 = no)| 0, 1 |"]
2190 #[doc = "| 5 (Roll Input Mode)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| |"]
2191 #[doc = "| 6 (Pitch Input Mode)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| |"]
2192 #[doc = "| 7 (Yaw Input Mode)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| |"]
2193 MAV_CMD_DO_MOUNT_CONFIGURE = 204,
2194 #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
2195 #[doc = "Mission command to control a camera or antenna mount"]
2196 #[doc = ""]
2197 #[doc = "# Parameters"]
2198 #[doc = ""]
2199 #[doc = "| Parameter | Description | Values | Units |"]
2200 #[doc = "| --------- | ----------- | ------ | ----- |"]
2201 #[doc = "| 1 (Pitch) | pitch depending on mount mode (degrees or degrees/second depending on pitch input).| | |"]
2202 #[doc = "| 2 (Roll) | roll depending on mount mode (degrees or degrees/second depending on roll input).| | |"]
2203 #[doc = "| 3 (Yaw) | yaw depending on mount mode (degrees or degrees/second depending on yaw input).| | |"]
2204 #[doc = "| 4 (Altitude)| altitude depending on mount mode.| | m |"]
2205 #[doc = "| 5 (Latitude)| latitude, set if appropriate mount mode.| | |"]
2206 #[doc = "| 6 (Longitude)| longitude, set if appropriate mount mode.| | |"]
2207 #[doc = "| 7 (Mode) | Mount mode. | [`MavMountMode`] | |"]
2208 MAV_CMD_DO_MOUNT_CONTROL = 205,
2209 #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
2210 #[doc = ""]
2211 #[doc = "# Parameters"]
2212 #[doc = ""]
2213 #[doc = "| Parameter | Description | Values | Units |"]
2214 #[doc = "| --------- | ----------- | ------ | ----- |"]
2215 #[doc = "| 1 (Distance)| Camera trigger distance. 0 to stop triggering.| ≥ 0 | m |"]
2216 #[doc = "| 2 (Shutter)| Camera shutter integration time. -1 or 0 to ignore| -1, 0, .. | ms |"]
2217 #[doc = "| 3 (Trigger)| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| 0, 1 | |"]
2218 #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 | |"]
2219 #[doc = "| 5 | Empty | | |"]
2220 #[doc = "| 6 | Empty | | |"]
2221 #[doc = "| 7 | Empty | | |"]
2222 MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
2223 #[doc = "Enable the geofence. This can be used in a mission or via the command protocol. The persistence/lifetime of the setting is undefined. Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. Flight stacks typically reset the setting to system defaults on reboot."]
2224 #[doc = ""]
2225 #[doc = "# Parameters"]
2226 #[doc = ""]
2227 #[doc = "| Parameter | Description | Values |"]
2228 #[doc = "| --------- | ----------- | ------ |"]
2229 #[doc = "| 1 (Enable)| enable? (0=disable, 1=enable, 2=disable_floor_only)| 0, 1, 2 |"]
2230 #[doc = "| 2 (Types) | Fence types to enable or disable as a bitmask. 0: field is unused/all fences should be enabled or disabled (for compatiblity reasons). Parameter is ignored if param1=2.| [`FenceType`] |"]
2231 #[doc = "| 3 | Empty | |"]
2232 #[doc = "| 4 | Empty | |"]
2233 #[doc = "| 5 | Empty | |"]
2234 #[doc = "| 6 | Empty | |"]
2235 #[doc = "| 7 | Empty | |"]
2236 MAV_CMD_DO_FENCE_ENABLE = 207,
2237 #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
2238 #[doc = ""]
2239 #[doc = "# Parameters"]
2240 #[doc = ""]
2241 #[doc = "| Parameter | Description | Values |"]
2242 #[doc = "| --------- | ----------- | ------ |"]
2243 #[doc = "| 1 (Action)| Action | [`ParachuteAction`] |"]
2244 #[doc = "| 2 | Empty | |"]
2245 #[doc = "| 3 | Empty | |"]
2246 #[doc = "| 4 | Empty | |"]
2247 #[doc = "| 5 | Empty | |"]
2248 #[doc = "| 6 | Empty | |"]
2249 #[doc = "| 7 | Empty | |"]
2250 MAV_CMD_DO_PARACHUTE = 208,
2251 #[doc = "Command to perform motor test."]
2252 #[doc = ""]
2253 #[doc = "# Parameters"]
2254 #[doc = ""]
2255 #[doc = "| Parameter | Description | Values | Units |"]
2256 #[doc = "| --------- | ----------- | ------ | ----- |"]
2257 #[doc = "| 1 (Instance)| Motor instance number (from 1 to max number of motors on the vehicle).| 1, 2, .. | |"]
2258 #[doc = "| 2 (Throttle Type)| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| [`MotorTestThrottleType`] | |"]
2259 #[doc = "| 3 (Throttle)| Throttle value.| | |"]
2260 #[doc = "| 4 (Timeout)| Timeout between tests that are run in sequence.| ≥ 0 | s |"]
2261 #[doc = "| 5 (Motor Count)| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| 0, 1, .. | |"]
2262 #[doc = "| 6 (Test Order)| Motor test order.| [`MotorTestOrder`] | |"]
2263 #[doc = "| 7 | Empty | | |"]
2264 MAV_CMD_DO_MOTOR_TEST = 209,
2265 #[doc = "Change to/from inverted flight."]
2266 #[doc = ""]
2267 #[doc = "# Parameters"]
2268 #[doc = ""]
2269 #[doc = "| Parameter | Description | Values |"]
2270 #[doc = "| --------- | ----------- | ------ |"]
2271 #[doc = "| 1 (Inverted)| Inverted flight. (0=normal, 1=inverted)| 0, 1 |"]
2272 #[doc = "| 2 | Empty | |"]
2273 #[doc = "| 3 | Empty | |"]
2274 #[doc = "| 4 | Empty | |"]
2275 #[doc = "| 5 | Empty | |"]
2276 #[doc = "| 6 | Empty | |"]
2277 #[doc = "| 7 | Empty | |"]
2278 MAV_CMD_DO_INVERTED_FLIGHT = 210,
2279 #[doc = "Mission command to operate a gripper."]
2280 #[doc = ""]
2281 #[doc = "# Parameters"]
2282 #[doc = ""]
2283 #[doc = "| Parameter | Description | Values |"]
2284 #[doc = "| --------- | ----------- | ------ |"]
2285 #[doc = "| 1 (Instance)| Gripper instance number.| 1, 2, .. |"]
2286 #[doc = "| 2 (Action)| Gripper action to perform.| [`GripperActions`] |"]
2287 #[doc = "| 3 | Empty | |"]
2288 #[doc = "| 4 | Empty | |"]
2289 #[doc = "| 5 | Empty | |"]
2290 #[doc = "| 6 | Empty | |"]
2291 #[doc = "| 7 | Empty | |"]
2292 MAV_CMD_DO_GRIPPER = 211,
2293 #[doc = "Enable/disable autotune."]
2294 #[doc = ""]
2295 #[doc = "# Parameters"]
2296 #[doc = ""]
2297 #[doc = "| Parameter | Description | Values |"]
2298 #[doc = "| --------- | ----------- | ------ |"]
2299 #[doc = "| 1 (Enable)| Enable (1: enable, 0:disable).| 0, 1 |"]
2300 #[doc = "| 2 (Axis) | Specify axes for which autotuning is enabled/disabled. 0 indicates the field is unused (for compatiblity reasons). If 0 the autopilot will follow its default behaviour, which is usually to tune all axes.| [`AutotuneAxis`] |"]
2301 #[doc = "| 3 | Empty. | |"]
2302 #[doc = "| 4 | Empty. | |"]
2303 #[doc = "| 5 | Empty. | |"]
2304 #[doc = "| 6 | Empty. | |"]
2305 #[doc = "| 7 | Empty. | |"]
2306 MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
2307 #[doc = "Sets a desired vehicle turn angle and speed change."]
2308 #[doc = ""]
2309 #[doc = "# Parameters"]
2310 #[doc = ""]
2311 #[doc = "| Parameter | Description | Values | Units |"]
2312 #[doc = "| --------- | ----------- | ------ | ----- |"]
2313 #[doc = "| 1 (Yaw) | Yaw angle to adjust steering by.| | deg |"]
2314 #[doc = "| 2 (Speed) | Speed. | | m/s |"]
2315 #[doc = "| 3 (Angle) | Final angle. (0=absolute, 1=relative)| 0, 1 | |"]
2316 #[doc = "| 4 | Empty | | |"]
2317 #[doc = "| 5 | Empty | | |"]
2318 #[doc = "| 6 | Empty | | |"]
2319 #[doc = "| 7 | Empty | | |"]
2320 MAV_CMD_NAV_SET_YAW_SPEED = 213,
2321 #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
2322 #[doc = ""]
2323 #[doc = "# Parameters"]
2324 #[doc = ""]
2325 #[doc = "| Parameter | Description | Values | Units |"]
2326 #[doc = "| --------- | ----------- | ------ | ----- |"]
2327 #[doc = "| 1 (Trigger Cycle)| Camera trigger cycle time. -1 or 0 to ignore.| -1, 0, .. | ms |"]
2328 #[doc = "| 2 (Shutter Integration)| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| -1, 0, .. | ms |"]
2329 #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 | |"]
2330 #[doc = "| 4 | Empty | | |"]
2331 #[doc = "| 5 | Empty | | |"]
2332 #[doc = "| 6 | Empty | | |"]
2333 #[doc = "| 7 | Empty | | |"]
2334 MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
2335 #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
2336 #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
2337 #[doc = ""]
2338 #[doc = "# Parameters"]
2339 #[doc = ""]
2340 #[doc = "| Parameter | Description |"]
2341 #[doc = "| --------- | ----------- |"]
2342 #[doc = "| 1 (Q1) | quaternion param q1, w (1 in null-rotation)|"]
2343 #[doc = "| 2 (Q2) | quaternion param q2, x (0 in null-rotation)|"]
2344 #[doc = "| 3 (Q3) | quaternion param q3, y (0 in null-rotation)|"]
2345 #[doc = "| 4 (Q4) | quaternion param q4, z (0 in null-rotation)|"]
2346 #[doc = "| 5 | Empty |"]
2347 #[doc = "| 6 | Empty |"]
2348 #[doc = "| 7 | Empty |"]
2349 MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
2350 #[doc = "set id of master controller"]
2351 #[doc = ""]
2352 #[doc = "# Parameters"]
2353 #[doc = ""]
2354 #[doc = "| Parameter | Description | Values |"]
2355 #[doc = "| --------- | ----------- | ------ |"]
2356 #[doc = "| 1 (System ID)| System ID | 0, 1, .. , 255 |"]
2357 #[doc = "| 2 (Component ID)| Component ID| 0, 1, .. , 255 |"]
2358 #[doc = "| 3 | Empty | |"]
2359 #[doc = "| 4 | Empty | |"]
2360 #[doc = "| 5 | Empty | |"]
2361 #[doc = "| 6 | Empty | |"]
2362 #[doc = "| 7 | Empty | |"]
2363 MAV_CMD_DO_GUIDED_MASTER = 221,
2364 #[doc = "Set limits for external control"]
2365 #[doc = ""]
2366 #[doc = "# Parameters"]
2367 #[doc = ""]
2368 #[doc = "| Parameter | Description | Values | Units |"]
2369 #[doc = "| --------- | ----------- | ------ | ----- |"]
2370 #[doc = "| 1 (Timeout)| Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| ≥ 0 | s |"]
2371 #[doc = "| 2 (Min Altitude)| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| | m |"]
2372 #[doc = "| 3 (Max Altitude)| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| | m |"]
2373 #[doc = "| 4 (Horiz. Move Limit)| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| ≥ 0 | m |"]
2374 #[doc = "| 5 | Empty | | |"]
2375 #[doc = "| 6 | Empty | | |"]
2376 #[doc = "| 7 | Empty | | |"]
2377 MAV_CMD_DO_GUIDED_LIMITS = 222,
2378 #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
2379 #[doc = ""]
2380 #[doc = "# Parameters"]
2381 #[doc = ""]
2382 #[doc = "| Parameter | Description | Values | Units |"]
2383 #[doc = "| --------- | ----------- | ------ | ----- |"]
2384 #[doc = "| 1 (Start Engine)| 0: Stop engine, 1:Start Engine| 0, 1 | |"]
2385 #[doc = "| 2 (Cold Start)| 0: Warm start, 1:Cold start. Controls use of choke where applicable| 0, 1 | |"]
2386 #[doc = "| 3 (Height Delay)| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| ≥ 0 | m |"]
2387 #[doc = "| 4 | Empty | | |"]
2388 #[doc = "| 5 | Empty | | |"]
2389 #[doc = "| 6 | Empty | | |"]
2390 #[doc = "| 7 | Empty | | |"]
2391 MAV_CMD_DO_ENGINE_CONTROL = 223,
2392 #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. If the system is not in mission mode this command must not trigger a switch to mission mode. The mission may be \"reset\" using param2. Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. \t The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
2393 #[doc = ""]
2394 #[doc = "# Parameters"]
2395 #[doc = ""]
2396 #[doc = "| Parameter | Description | Values |"]
2397 #[doc = "| --------- | ----------- | ------ |"]
2398 #[doc = "| 1 (Number)| Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| -1, 0, .. |"]
2399 #[doc = "| 2 (Reset Mission)| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state \"completed\" to be \"active\" or \"paused\".| 0, 1 |"]
2400 #[doc = "| 3 | Empty | |"]
2401 #[doc = "| 4 | Empty | |"]
2402 #[doc = "| 5 | Empty | |"]
2403 #[doc = "| 6 | Empty | |"]
2404 #[doc = "| 7 | Empty | |"]
2405 MAV_CMD_DO_SET_MISSION_CURRENT = 224,
2406 #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
2407 #[doc = ""]
2408 #[doc = "# Parameters"]
2409 #[doc = ""]
2410 #[doc = "| Parameter | Description |"]
2411 #[doc = "| --------- | ----------- |"]
2412 #[doc = "| 1 | Empty |"]
2413 #[doc = "| 2 | Empty |"]
2414 #[doc = "| 3 | Empty |"]
2415 #[doc = "| 4 | Empty |"]
2416 #[doc = "| 5 | Empty |"]
2417 #[doc = "| 6 | Empty |"]
2418 #[doc = "| 7 | Empty |"]
2419 MAV_CMD_DO_LAST = 240,
2420 #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
2421 #[doc = ""]
2422 #[doc = "# Parameters"]
2423 #[doc = ""]
2424 #[doc = "| Parameter | Description | Values |"]
2425 #[doc = "| --------- | ----------- | ------ |"]
2426 #[doc = "| 1 (Gyro Temperature)| 1: gyro calibration, 3: gyro temperature calibration| 0, 1, .. , 3 |"]
2427 #[doc = "| 2 (Magnetometer)| 1: magnetometer calibration| 0, 1 |"]
2428 #[doc = "| 3 (Ground Pressure)| 1: ground pressure calibration| 0, 1 |"]
2429 #[doc = "| 4 (Remote Control)| 1: radio RC calibration, 2: RC trim calibration| 0, 1 |"]
2430 #[doc = "| 5 (Accelerometer)| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 0, 1, .. , 4 |"]
2431 #[doc = "| 6 (Compmot or Airspeed)| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 0, 1, 2 |"]
2432 #[doc = "| 7 (ESC or Baro)| 1: ESC calibration, 3: barometer temperature calibration| 0, 1, .. , 3 |"]
2433 MAV_CMD_PREFLIGHT_CALIBRATION = 241,
2434 #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
2435 #[doc = ""]
2436 #[doc = "# Parameters"]
2437 #[doc = ""]
2438 #[doc = "| Parameter | Description | Values |"]
2439 #[doc = "| --------- | ----------- | ------ |"]
2440 #[doc = "| 1 (Sensor Type)| Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| 0, 1, .. , 6 |"]
2441 #[doc = "| 2 (X Offset)| X axis offset (or generic dimension 1), in the sensor's raw units| |"]
2442 #[doc = "| 3 (Y Offset)| Y axis offset (or generic dimension 2), in the sensor's raw units| |"]
2443 #[doc = "| 4 (Z Offset)| Z axis offset (or generic dimension 3), in the sensor's raw units| |"]
2444 #[doc = "| 5 (4th Dimension)| Generic dimension 4, in the sensor's raw units| |"]
2445 #[doc = "| 6 (5th Dimension)| Generic dimension 5, in the sensor's raw units| |"]
2446 #[doc = "| 7 (6th Dimension)| Generic dimension 6, in the sensor's raw units| |"]
2447 MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
2448 #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
2449 #[doc = ""]
2450 #[doc = "# Parameters"]
2451 #[doc = ""]
2452 #[doc = "| Parameter | Description |"]
2453 #[doc = "| --------- | ----------- |"]
2454 #[doc = "| 1 (Actuator ID)| 1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.|"]
2455 #[doc = "| 2 | Reserved |"]
2456 #[doc = "| 3 | Reserved |"]
2457 #[doc = "| 4 | Reserved |"]
2458 #[doc = "| 5 | Reserved |"]
2459 #[doc = "| 6 | Reserved |"]
2460 #[doc = "| 7 | Reserved |"]
2461 MAV_CMD_PREFLIGHT_UAVCAN = 243,
2462 #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
2463 #[doc = ""]
2464 #[doc = "# Parameters"]
2465 #[doc = ""]
2466 #[doc = "| Parameter | Description | Values | Units |"]
2467 #[doc = "| --------- | ----------- | ------ | ----- |"]
2468 #[doc = "| 1 (Parameter Storage)| Action to perform on the persistent parameter storage| [`PreflightStorageParameterAction`] | |"]
2469 #[doc = "| 2 (Mission Storage)| Action to perform on the persistent mission storage| [`PreflightStorageMissionAction`] | |"]
2470 #[doc = "| 3 (Logging Rate)| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging,>1: logging rate (e.g. set to 1000 for 1000 Hz logging)| -1, 0, .. | Hz |"]
2471 #[doc = "| 4 | Reserved | | |"]
2472 #[doc = "| 5 | Empty | | |"]
2473 #[doc = "| 6 | Empty | | |"]
2474 #[doc = "| 7 | Empty | | |"]
2475 MAV_CMD_PREFLIGHT_STORAGE = 245,
2476 #[doc = "Request the reboot or shutdown of system components."]
2477 #[doc = ""]
2478 #[doc = "# Parameters"]
2479 #[doc = ""]
2480 #[doc = "| Parameter | Description | Values |"]
2481 #[doc = "| --------- | ----------- | ------ |"]
2482 #[doc = "| 1 (Autopilot)| 0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0, 1, .. , 3 |"]
2483 #[doc = "| 2 (Companion)| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0, 1, .. , 3 |"]
2484 #[doc = "| 3 (Component action)| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| 0, 1, .. , 3 |"]
2485 #[doc = "| 4 (Component ID)| MAVLink Component ID targeted in param3 (0 for all components).| 0, 1, .. , 255 |"]
2486 #[doc = "| 5 | Reserved (set to 0)| |"]
2487 #[doc = "| 6 (Conditions)| Conditions under which reboot/shutdown is allowed.| [`RebootShutdownConditions`] |"]
2488 #[doc = "| 7 | WIP: ID (e.g. camera ID -1 for all IDs)| |"]
2489 MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
2490 #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
2491 #[doc = ""]
2492 #[doc = "# Parameters"]
2493 #[doc = ""]
2494 #[doc = "| Parameter | Description | Values | Units |"]
2495 #[doc = "| --------- | ----------- | ------ | ----- |"]
2496 #[doc = "| 1 (Continue)| MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| [`MavGoto`] | |"]
2497 #[doc = "| 2 (Position)| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| [`MavGoto`] | |"]
2498 #[doc = "| 3 (Frame) | Coordinate frame of hold point.| [`MavFrame`] | |"]
2499 #[doc = "| 4 (Yaw) | Desired yaw angle.| | deg |"]
2500 #[doc = "| 5 (Latitude/X)| Latitude/X position.| | |"]
2501 #[doc = "| 6 (Longitude/Y)| Longitude/Y position.| | |"]
2502 #[doc = "| 7 (Altitude/Z)| Altitude/Z position.| | |"]
2503 MAV_CMD_OVERRIDE_GOTO = 252,
2504 #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
2505 #[doc = ""]
2506 #[doc = "# Parameters"]
2507 #[doc = ""]
2508 #[doc = "| Parameter | Description | Values | Units |"]
2509 #[doc = "| --------- | ----------- | ------ | ----- |"]
2510 #[doc = "| 1 (Distance)| Camera trigger distance. 0 to stop triggering.| ≥ 0 | m |"]
2511 #[doc = "| 2 (Shutter)| Camera shutter integration time. 0 to ignore| 0, 1, .. | ms |"]
2512 #[doc = "| 3 (Min Interval)| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| 0, 1, .. , 10000 | ms |"]
2513 #[doc = "| 4 (Positions)| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| 2, 3, .. | |"]
2514 #[doc = "| 5 (Roll Angle)| Angle limits that the camera can be rolled to left and right of center.| ≥ 0 | deg |"]
2515 #[doc = "| 6 (Pitch Angle)| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| -180 .. 180 | deg |"]
2516 #[doc = "| 7 | Empty | | |"]
2517 MAV_CMD_OBLIQUE_SURVEY = 260,
2518 #[doc = "Enable the specified standard MAVLink mode. If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED. See <https://mavlink.io/en/services/standard_modes.html>"]
2519 #[doc = ""]
2520 #[doc = "# Parameters"]
2521 #[doc = ""]
2522 #[doc = "| Parameter | Description | Values |"]
2523 #[doc = "| --------- | ----------- | ------ |"]
2524 #[doc = "| 1 (Standard Mode)| The mode to set.| [`MavStandardMode`] |"]
2525 #[doc = "| 2 | | Reserved (use 0) |"]
2526 #[doc = "| 3 | | Reserved (use 0) |"]
2527 #[doc = "| 4 | | Reserved (use 0) |"]
2528 #[doc = "| 5 | | Reserved (use 0) |"]
2529 #[doc = "| 6 | | Reserved (use 0) |"]
2530 #[doc = "| 7 | | Reserved (use NaN) |"]
2531 MAV_CMD_DO_SET_STANDARD_MODE = 262,
2532 #[doc = "start running a mission"]
2533 #[doc = ""]
2534 #[doc = "# Parameters"]
2535 #[doc = ""]
2536 #[doc = "| Parameter | Description | Values |"]
2537 #[doc = "| --------- | ----------- | ------ |"]
2538 #[doc = "| 1 (First Item)| first_item: the first mission item to run| 0, 1, .. |"]
2539 #[doc = "| 2 (Last Item)| last_item: the last mission item to run (after this item is run, the mission ends)| 0, 1, .. |"]
2540 MAV_CMD_MISSION_START = 300,
2541 #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
2542 #[doc = ""]
2543 #[doc = "# Parameters"]
2544 #[doc = ""]
2545 #[doc = "| Parameter | Description | Values | Units |"]
2546 #[doc = "| --------- | ----------- | ------ | ----- |"]
2547 #[doc = "| 1 (Value) | Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| -1 .. 1 | |"]
2548 #[doc = "| 2 (Timeout)| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| 0 .. 3 | s |"]
2549 #[doc = "| 3 | | Reserved (use 0) | |"]
2550 #[doc = "| 4 | | Reserved (use 0) | |"]
2551 #[doc = "| 5 (Output Function)| Actuator Output function| [`ActuatorOutputFunction`] | |"]
2552 #[doc = "| 6 | | Reserved (use 0) | |"]
2553 #[doc = "| 7 | | Reserved (use 0) | |"]
2554 MAV_CMD_ACTUATOR_TEST = 310,
2555 #[doc = "Actuator configuration command."]
2556 #[doc = ""]
2557 #[doc = "# Parameters"]
2558 #[doc = ""]
2559 #[doc = "| Parameter | Description | Values |"]
2560 #[doc = "| --------- | ----------- | ------ |"]
2561 #[doc = "| 1 (Configuration)| Actuator configuration action| [`ActuatorConfiguration`] |"]
2562 #[doc = "| 2 | | Reserved (use 0) |"]
2563 #[doc = "| 3 | | Reserved (use 0) |"]
2564 #[doc = "| 4 | | Reserved (use 0) |"]
2565 #[doc = "| 5 (Output Function)| Actuator Output function| [`ActuatorOutputFunction`] |"]
2566 #[doc = "| 6 | | Reserved (use 0) |"]
2567 #[doc = "| 7 | | Reserved (use 0) |"]
2568 MAV_CMD_CONFIGURE_ACTUATOR = 311,
2569 #[doc = "Arms / Disarms a component"]
2570 #[doc = ""]
2571 #[doc = "# Parameters"]
2572 #[doc = ""]
2573 #[doc = "| Parameter | Description | Values |"]
2574 #[doc = "| --------- | ----------- | ------ |"]
2575 #[doc = "| 1 (Arm) | 0: disarm, 1: arm| 0, 1 |"]
2576 #[doc = "| 2 (Force) | 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| 0, 21196 |"]
2577 MAV_CMD_COMPONENT_ARM_DISARM = 400,
2578 #[doc = "Instructs a target system to run pre-arm checks. This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. This command should return MAV_RESULT_ACCEPTED if it will run the checks. The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
2579 MAV_CMD_RUN_PREARM_CHECKS = 401,
2580 #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2581 #[doc = ""]
2582 #[doc = "# Parameters"]
2583 #[doc = ""]
2584 #[doc = "| Parameter | Description | Values |"]
2585 #[doc = "| --------- | ----------- | ------ |"]
2586 #[doc = "| 1 (Enable)| 0: Illuminators OFF, 1: Illuminators ON| 0, 1 |"]
2587 MAV_CMD_ILLUMINATOR_ON_OFF = 405,
2588 #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2589 #[doc = ""]
2590 #[doc = "# Parameters"]
2591 #[doc = ""]
2592 #[doc = "| Parameter | Description | Values | Units |"]
2593 #[doc = "| --------- | ----------- | ------ | ----- |"]
2594 #[doc = "| 1 (Mode) | Mode | [`IlluminatorMode`] | |"]
2595 #[doc = "| 2 (Brightness)| 0%: Off, 100%: Max Brightness| 0 .. 100 | % |"]
2596 #[doc = "| 3 (Strobe Period)| Strobe period in seconds where 0 means strobing is not used| ≥ 0 | s |"]
2597 #[doc = "| 4 (Strobe Duty)| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| 0 .. 100 | % |"]
2598 MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
2599 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
2600 #[doc = "Request the home position from the vehicle. \t The vehicle will ACK the command and then emit the HOME_POSITION message."]
2601 #[doc = ""]
2602 #[doc = "# Parameters"]
2603 #[doc = ""]
2604 #[doc = "| Parameter | Description |"]
2605 #[doc = "| --------- | ----------- |"]
2606 #[doc = "| 1 | Reserved |"]
2607 #[doc = "| 2 | Reserved |"]
2608 #[doc = "| 3 | Reserved |"]
2609 #[doc = "| 4 | Reserved |"]
2610 #[doc = "| 5 | Reserved |"]
2611 #[doc = "| 6 | Reserved |"]
2612 #[doc = "| 7 | Reserved |"]
2613 MAV_CMD_GET_HOME_POSITION = 410,
2614 #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
2615 #[doc = ""]
2616 #[doc = "# Parameters"]
2617 #[doc = ""]
2618 #[doc = "| Parameter | Description | Values |"]
2619 #[doc = "| --------- | ----------- | ------ |"]
2620 #[doc = "| 1 (Failure unit)| The unit which is affected by the failure.| [`FailureUnit`] |"]
2621 #[doc = "| 2 (Failure type)| The type how the failure manifests itself.| [`FailureType`] |"]
2622 #[doc = "| 3 (Instance)| Instance affected by failure (0 to signal all).| |"]
2623 MAV_CMD_INJECT_FAILURE = 420,
2624 #[doc = "Starts receiver pairing."]
2625 #[doc = ""]
2626 #[doc = "# Parameters"]
2627 #[doc = ""]
2628 #[doc = "| Parameter | Description | Values |"]
2629 #[doc = "| --------- | ----------- | ------ |"]
2630 #[doc = "| 1 (RC Type)| RC type. | [`RcType`] |"]
2631 #[doc = "| 2 (RC Sub Type)| RC sub type.| [`RcSubType`] |"]
2632 MAV_CMD_START_RX_PAIR = 500,
2633 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
2634 #[doc = "Request the interval between messages for a particular MAVLink message ID. The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
2635 #[doc = ""]
2636 #[doc = "# Parameters"]
2637 #[doc = ""]
2638 #[doc = "| Parameter | Description | Values |"]
2639 #[doc = "| --------- | ----------- | ------ |"]
2640 #[doc = "| 1 (Message ID)| The MAVLink message ID| 0, 1, .. , 16777215 |"]
2641 MAV_CMD_GET_MESSAGE_INTERVAL = 510,
2642 #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
2643 #[doc = ""]
2644 #[doc = "# Parameters"]
2645 #[doc = ""]
2646 #[doc = "| Parameter | Description | Values | Units |"]
2647 #[doc = "| --------- | ----------- | ------ | ----- |"]
2648 #[doc = "| 1 (Message ID)| The MAVLink message ID| 0, 1, .. , 16777215 | |"]
2649 #[doc = "| 2 (Interval)| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| -1, 0, .. | us |"]
2650 #[doc = "| 3 (Req Param 3)| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0). When used as an index ID, 0 means \"all instances\", \"1\" means the first instance in the sequence (the emitted message will have an id of 0 if message ids are 0-indexed, or 1 if index numbers start from one).| | |"]
2651 #[doc = "| 4 (Req Param 4)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| | |"]
2652 #[doc = "| 5 (Req Param 5)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0/NaN).| | |"]
2653 #[doc = "| 6 (Req Param 6)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0/NaN).| | |"]
2654 #[doc = "| 7 (Response Target)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| 0, 1, 2 | |"]
2655 MAV_CMD_SET_MESSAGE_INTERVAL = 511,
2656 #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
2657 #[doc = ""]
2658 #[doc = "# Parameters"]
2659 #[doc = ""]
2660 #[doc = "| Parameter | Description | Values |"]
2661 #[doc = "| --------- | ----------- | ------ |"]
2662 #[doc = "| 1 (Message ID)| The MAVLink message ID of the requested message.| 0, 1, .. , 16777215 |"]
2663 #[doc = "| 2 (Req Param 1)| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| |"]
2664 #[doc = "| 3 (Req Param 2)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| |"]
2665 #[doc = "| 4 (Req Param 3)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| |"]
2666 #[doc = "| 5 (Req Param 4)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| |"]
2667 #[doc = "| 6 (Req Param 5)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| |"]
2668 #[doc = "| 7 (Response Target)| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| 0, 1, 2 |"]
2669 MAV_CMD_REQUEST_MESSAGE = 512,
2670 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2671 #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
2672 #[doc = ""]
2673 #[doc = "# Parameters"]
2674 #[doc = ""]
2675 #[doc = "| Parameter | Description | Values |"]
2676 #[doc = "| --------- | ----------- | ------ |"]
2677 #[doc = "| 1 (Protocol)| 1: Request supported protocol versions by all nodes on the network| 0, 1 |"]
2678 #[doc = "| 2 | Reserved (all remaining params)| |"]
2679 MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
2680 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2681 #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
2682 #[doc = ""]
2683 #[doc = "# Parameters"]
2684 #[doc = ""]
2685 #[doc = "| Parameter | Description | Values |"]
2686 #[doc = "| --------- | ----------- | ------ |"]
2687 #[doc = "| 1 (Version)| 1: Request autopilot version| 0, 1 |"]
2688 #[doc = "| 2 | Reserved (all remaining params)| |"]
2689 MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
2690 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2691 #[doc = "Request camera information (CAMERA_INFORMATION)."]
2692 #[doc = ""]
2693 #[doc = "# Parameters"]
2694 #[doc = ""]
2695 #[doc = "| Parameter | Description | Values |"]
2696 #[doc = "| --------- | ----------- | ------ |"]
2697 #[doc = "| 1 (Capabilities)| 0: No action 1: Request camera capabilities| 0, 1 |"]
2698 #[doc = "| 2 | Reserved (all remaining params)| |"]
2699 MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
2700 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2701 #[doc = "Request camera settings (CAMERA_SETTINGS)."]
2702 #[doc = ""]
2703 #[doc = "# Parameters"]
2704 #[doc = ""]
2705 #[doc = "| Parameter | Description | Values |"]
2706 #[doc = "| --------- | ----------- | ------ |"]
2707 #[doc = "| 1 (Settings)| 0: No Action 1: Request camera settings| 0, 1 |"]
2708 #[doc = "| 2 | Reserved (all remaining params)| |"]
2709 MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
2710 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2711 #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
2712 #[doc = ""]
2713 #[doc = "# Parameters"]
2714 #[doc = ""]
2715 #[doc = "| Parameter | Description | Values |"]
2716 #[doc = "| --------- | ----------- | ------ |"]
2717 #[doc = "| 1 (Storage ID)| Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
2718 #[doc = "| 2 (Information)| 0: No Action 1: Request storage information| 0, 1 |"]
2719 #[doc = "| 3 | Reserved (all remaining params)| |"]
2720 MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
2721 #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
2722 #[doc = ""]
2723 #[doc = "# Parameters"]
2724 #[doc = ""]
2725 #[doc = "| Parameter | Description | Values |"]
2726 #[doc = "| --------- | ----------- | ------ |"]
2727 #[doc = "| 1 (Storage ID)| Storage ID (1 for first, 2 for second, etc.)| 0, 1, .. |"]
2728 #[doc = "| 2 (Format)| Format storage (and reset image log). 0: No action 1: Format storage| 0, 1 |"]
2729 #[doc = "| 3 (Reset Image Log)| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| 0, 1 |"]
2730 #[doc = "| 4 | Reserved (all remaining params)| |"]
2731 MAV_CMD_STORAGE_FORMAT = 526,
2732 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2733 #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
2734 #[doc = ""]
2735 #[doc = "# Parameters"]
2736 #[doc = ""]
2737 #[doc = "| Parameter | Description | Values |"]
2738 #[doc = "| --------- | ----------- | ------ |"]
2739 #[doc = "| 1 (Capture Status)| 0: No Action 1: Request camera capture status| 0, 1 |"]
2740 #[doc = "| 2 | Reserved (all remaining params)| |"]
2741 MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
2742 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2743 #[doc = "Request flight information (FLIGHT_INFORMATION)"]
2744 #[doc = ""]
2745 #[doc = "# Parameters"]
2746 #[doc = ""]
2747 #[doc = "| Parameter | Description | Values |"]
2748 #[doc = "| --------- | ----------- | ------ |"]
2749 #[doc = "| 1 (Flight Information)| 1: Request flight information| 0, 1 |"]
2750 #[doc = "| 2 | Reserved (all remaining params)| |"]
2751 MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
2752 #[doc = "Reset all camera settings to Factory Default"]
2753 #[doc = ""]
2754 #[doc = "# Parameters"]
2755 #[doc = ""]
2756 #[doc = "| Parameter | Description | Values |"]
2757 #[doc = "| --------- | ----------- | ------ |"]
2758 #[doc = "| 1 (Reset) | 0: No Action 1: Reset all settings| 0, 1 |"]
2759 #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2760 MAV_CMD_RESET_CAMERA_SETTINGS = 529,
2761 #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
2762 #[doc = ""]
2763 #[doc = "# Parameters"]
2764 #[doc = ""]
2765 #[doc = "| Parameter | Description | Values |"]
2766 #[doc = "| --------- | ----------- | ------ |"]
2767 #[doc = "| 1 (id) | Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2768 #[doc = "| 2 (Camera Mode)| Camera mode | [`CameraMode`] |"]
2769 #[doc = "| 3 | | Reserved (use NaN) |"]
2770 #[doc = "| 4 | | Reserved (use NaN) |"]
2771 #[doc = "| 5 | | |"]
2772 #[doc = "| 6 | | |"]
2773 #[doc = "| 7 | | Reserved (use NaN) |"]
2774 MAV_CMD_SET_CAMERA_MODE = 530,
2775 #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2776 #[doc = ""]
2777 #[doc = "# Parameters"]
2778 #[doc = ""]
2779 #[doc = "| Parameter | Description | Values |"]
2780 #[doc = "| --------- | ----------- | ------ |"]
2781 #[doc = "| 1 (Zoom Type)| Zoom type | [`CameraZoomType`] |"]
2782 #[doc = "| 2 (Zoom Value)| Zoom value. The range of valid values depend on the zoom type.| |"]
2783 #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2784 #[doc = "| 4 | | Reserved (use NaN) |"]
2785 MAV_CMD_SET_CAMERA_ZOOM = 531,
2786 #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2787 #[doc = ""]
2788 #[doc = "# Parameters"]
2789 #[doc = ""]
2790 #[doc = "| Parameter | Description | Values |"]
2791 #[doc = "| --------- | ----------- | ------ |"]
2792 #[doc = "| 1 (Focus Type)| Focus type | [`SetFocusType`] |"]
2793 #[doc = "| 2 (Focus Value)| Focus value | |"]
2794 #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2795 #[doc = "| 4 | | Reserved (use NaN) |"]
2796 MAV_CMD_SET_CAMERA_FOCUS = 532,
2797 #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage. If no flag is set the system should use its default storage. A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED. A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
2798 #[doc = ""]
2799 #[doc = "# Parameters"]
2800 #[doc = ""]
2801 #[doc = "| Parameter | Description | Values |"]
2802 #[doc = "| --------- | ----------- | ------ |"]
2803 #[doc = "| 1 (Storage ID)| Storage ID (1 for first, 2 for second, etc.)| 0, 1, .. |"]
2804 #[doc = "| 2 (Usage) | Usage flags | [`StorageUsageFlag`] |"]
2805 MAV_CMD_SET_STORAGE_USAGE = 533,
2806 #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
2807 #[doc = ""]
2808 #[doc = "# Parameters"]
2809 #[doc = ""]
2810 #[doc = "| Parameter | Description | Values |"]
2811 #[doc = "| --------- | ----------- | ------ |"]
2812 #[doc = "| 1 (device id)| Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| |"]
2813 #[doc = "| 2 (primary source)| Primary Source| [`CameraSource`] |"]
2814 #[doc = "| 3 (secondary source)| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| [`CameraSource`] |"]
2815 MAV_CMD_SET_CAMERA_SOURCE = 534,
2816 #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
2817 #[doc = ""]
2818 #[doc = "# Parameters"]
2819 #[doc = ""]
2820 #[doc = "| Parameter | Description | Values |"]
2821 #[doc = "| --------- | ----------- | ------ |"]
2822 #[doc = "| 1 (Tag) | Tag. | 0, 1, .. |"]
2823 MAV_CMD_JUMP_TAG = 600,
2824 #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
2825 #[doc = ""]
2826 #[doc = "# Parameters"]
2827 #[doc = ""]
2828 #[doc = "| Parameter | Description | Values |"]
2829 #[doc = "| --------- | ----------- | ------ |"]
2830 #[doc = "| 1 (Tag) | Target tag to jump to.| 0, 1, .. |"]
2831 #[doc = "| 2 (Repeat)| Repeat count.| 0, 1, .. |"]
2832 MAV_CMD_DO_JUMP_TAG = 601,
2833 #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
2834 #[doc = ""]
2835 #[doc = "# Parameters"]
2836 #[doc = ""]
2837 #[doc = "| Parameter | Description | Values | Units |"]
2838 #[doc = "| --------- | ----------- | ------ | ----- |"]
2839 #[doc = "| 1 (Pitch angle)| Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| -180 .. 180 | deg |"]
2840 #[doc = "| 2 (Yaw angle)| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| -180 .. 180 | deg |"]
2841 #[doc = "| 3 (Pitch rate)| Pitch rate (positive to pitch up).| | deg/s |"]
2842 #[doc = "| 4 (Yaw rate)| Yaw rate (positive to yaw to the right).| | deg/s |"]
2843 #[doc = "| 5 (Gimbal manager flags)| Gimbal manager flags to use.| [`GimbalManagerFlags`] | |"]
2844 #[doc = "| 6 | | | |"]
2845 #[doc = "| 7 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| | |"]
2846 MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
2847 #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
2848 #[doc = ""]
2849 #[doc = "# Parameters"]
2850 #[doc = ""]
2851 #[doc = "| Parameter | Description |"]
2852 #[doc = "| --------- | ----------- |"]
2853 #[doc = "| 1 (sysid primary control)| Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2854 #[doc = "| 2 (compid primary control)| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2855 #[doc = "| 3 (sysid secondary control)| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2856 #[doc = "| 4 (compid secondary control)| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2857 #[doc = "| 5 | |"]
2858 #[doc = "| 6 | |"]
2859 #[doc = "| 7 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|"]
2860 MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
2861 #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). It is also needed to specify the target camera in missions. When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). If the param1 is 0 the autopilot should do both. When sent in a command the target MAVLink address is set using target_component. If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2862 #[doc = ""]
2863 #[doc = "# Parameters"]
2864 #[doc = ""]
2865 #[doc = "| Parameter | Description | Values | Units |"]
2866 #[doc = "| --------- | ----------- | ------ | ----- |"]
2867 #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 | |"]
2868 #[doc = "| 2 (Interval)| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| ≥ 0 | s |"]
2869 #[doc = "| 3 (Total Images)| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| 0, 1, .. | |"]
2870 #[doc = "| 4 (Sequence Number)| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| 1, 2, .. | |"]
2871 #[doc = "| 5 | | | |"]
2872 #[doc = "| 6 | | | |"]
2873 #[doc = "| 7 | | Reserved (use NaN) | |"]
2874 MAV_CMD_IMAGE_START_CAPTURE = 2000,
2875 #[doc = "Stop image capture sequence. Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). It is also needed to specify the target camera in missions. When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). If the param1 is 0 the autopilot should do both. When sent in a command the target MAVLink address is set using target_component. If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2876 #[doc = ""]
2877 #[doc = "# Parameters"]
2878 #[doc = ""]
2879 #[doc = "| Parameter | Description | Values |"]
2880 #[doc = "| --------- | ----------- | ------ |"]
2881 #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2882 #[doc = "| 2 | | Reserved (use NaN) |"]
2883 #[doc = "| 3 | | Reserved (use NaN) |"]
2884 #[doc = "| 4 | | Reserved (use NaN) |"]
2885 #[doc = "| 5 | | |"]
2886 #[doc = "| 6 | | |"]
2887 #[doc = "| 7 | | Reserved (use NaN) |"]
2888 MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
2889 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2890 #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
2891 #[doc = ""]
2892 #[doc = "# Parameters"]
2893 #[doc = ""]
2894 #[doc = "| Parameter | Description | Values |"]
2895 #[doc = "| --------- | ----------- | ------ |"]
2896 #[doc = "| 1 (Number)| Sequence number for missing CAMERA_IMAGE_CAPTURED message| 0, 1, .. |"]
2897 #[doc = "| 2 | | Reserved (use NaN) |"]
2898 #[doc = "| 3 | | Reserved (use NaN) |"]
2899 #[doc = "| 4 | | Reserved (use NaN) |"]
2900 #[doc = "| 5 | | |"]
2901 #[doc = "| 6 | | |"]
2902 #[doc = "| 7 | | Reserved (use NaN) |"]
2903 MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
2904 #[doc = "Enable or disable on-board camera triggering system."]
2905 #[doc = ""]
2906 #[doc = "# Parameters"]
2907 #[doc = ""]
2908 #[doc = "| Parameter | Description | Values |"]
2909 #[doc = "| --------- | ----------- | ------ |"]
2910 #[doc = "| 1 (Enable)| Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| -1, 0, 1 |"]
2911 #[doc = "| 2 (Reset) | 1 to reset the trigger sequence, -1 or 0 to ignore| -1, 0, 1 |"]
2912 #[doc = "| 3 (Pause) | 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| -1, 1 |"]
2913 #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2914 MAV_CMD_DO_TRIGGER_CONTROL = 2003,
2915 #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
2916 #[doc = ""]
2917 #[doc = "# Parameters"]
2918 #[doc = ""]
2919 #[doc = "| Parameter | Description | Values |"]
2920 #[doc = "| --------- | ----------- | ------ |"]
2921 #[doc = "| 1 (Point x)| Point to track x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2922 #[doc = "| 2 (Point y)| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2923 #[doc = "| 3 (Radius)| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| 0 .. 1 |"]
2924 #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2925 MAV_CMD_CAMERA_TRACK_POINT = 2004,
2926 #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
2927 #[doc = ""]
2928 #[doc = "# Parameters"]
2929 #[doc = ""]
2930 #[doc = "| Parameter | Description | Values |"]
2931 #[doc = "| --------- | ----------- | ------ |"]
2932 #[doc = "| 1 (Top left corner x)| Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2933 #[doc = "| 2 (Top left corner y)| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2934 #[doc = "| 3 (Bottom right corner x)| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2935 #[doc = "| 4 (Bottom right corner y)| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2936 #[doc = "| 5 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2937 MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
2938 #[doc = "Stops ongoing tracking."]
2939 #[doc = ""]
2940 #[doc = "# Parameters"]
2941 #[doc = ""]
2942 #[doc = "| Parameter | Description | Values |"]
2943 #[doc = "| --------- | ----------- | ------ |"]
2944 #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2945 MAV_CMD_CAMERA_STOP_TRACKING = 2010,
2946 #[doc = "Starts video capture (recording)."]
2947 #[doc = ""]
2948 #[doc = "# Parameters"]
2949 #[doc = ""]
2950 #[doc = "| Parameter | Description | Values | Units |"]
2951 #[doc = "| --------- | ----------- | ------ | ----- |"]
2952 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams)| 0, 1, .. | |"]
2953 #[doc = "| 2 (Status Frequency)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| ≥ 0 | Hz |"]
2954 #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 | |"]
2955 #[doc = "| 4 | | Reserved (use NaN) | |"]
2956 #[doc = "| 5 | | | |"]
2957 #[doc = "| 6 | | | |"]
2958 #[doc = "| 7 | | Reserved (use NaN) | |"]
2959 MAV_CMD_VIDEO_START_CAPTURE = 2500,
2960 #[doc = "Stop the current video capture (recording)."]
2961 #[doc = ""]
2962 #[doc = "# Parameters"]
2963 #[doc = ""]
2964 #[doc = "| Parameter | Description | Values |"]
2965 #[doc = "| --------- | ----------- | ------ |"]
2966 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams)| 0, 1, .. |"]
2967 #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2968 #[doc = "| 3 | | Reserved (use NaN) |"]
2969 #[doc = "| 4 | | Reserved (use NaN) |"]
2970 #[doc = "| 5 | | |"]
2971 #[doc = "| 6 | | |"]
2972 #[doc = "| 7 | | Reserved (use NaN) |"]
2973 MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
2974 #[doc = "Start video streaming"]
2975 #[doc = ""]
2976 #[doc = "# Parameters"]
2977 #[doc = ""]
2978 #[doc = "| Parameter | Description | Values |"]
2979 #[doc = "| --------- | ----------- | ------ |"]
2980 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
2981 #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2982 MAV_CMD_VIDEO_START_STREAMING = 2502,
2983 #[doc = "Stop the given video stream"]
2984 #[doc = ""]
2985 #[doc = "# Parameters"]
2986 #[doc = ""]
2987 #[doc = "| Parameter | Description | Values |"]
2988 #[doc = "| --------- | ----------- | ------ |"]
2989 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
2990 #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2991 MAV_CMD_VIDEO_STOP_STREAMING = 2503,
2992 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2993 #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
2994 #[doc = ""]
2995 #[doc = "# Parameters"]
2996 #[doc = ""]
2997 #[doc = "| Parameter | Description | Values |"]
2998 #[doc = "| --------- | ----------- | ------ |"]
2999 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
3000 MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
3001 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
3002 #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
3003 #[doc = ""]
3004 #[doc = "# Parameters"]
3005 #[doc = ""]
3006 #[doc = "| Parameter | Description | Values |"]
3007 #[doc = "| --------- | ----------- | ------ |"]
3008 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
3009 MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
3010 #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
3011 #[doc = ""]
3012 #[doc = "# Parameters"]
3013 #[doc = ""]
3014 #[doc = "| Parameter | Description | Values |"]
3015 #[doc = "| --------- | ----------- | ------ |"]
3016 #[doc = "| 1 (Format)| Format: 0: ULog| 0, 1, .. |"]
3017 #[doc = "| 2 | Reserved (set to 0)| |"]
3018 #[doc = "| 3 | Reserved (set to 0)| |"]
3019 #[doc = "| 4 | Reserved (set to 0)| |"]
3020 #[doc = "| 5 | Reserved (set to 0)| |"]
3021 #[doc = "| 6 | Reserved (set to 0)| |"]
3022 #[doc = "| 7 | Reserved (set to 0)| |"]
3023 MAV_CMD_LOGGING_START = 2510,
3024 #[doc = "Request to stop streaming log data over MAVLink"]
3025 #[doc = ""]
3026 #[doc = "# Parameters"]
3027 #[doc = ""]
3028 #[doc = "| Parameter | Description |"]
3029 #[doc = "| --------- | ----------- |"]
3030 #[doc = "| 1 | Reserved (set to 0)|"]
3031 #[doc = "| 2 | Reserved (set to 0)|"]
3032 #[doc = "| 3 | Reserved (set to 0)|"]
3033 #[doc = "| 4 | Reserved (set to 0)|"]
3034 #[doc = "| 5 | Reserved (set to 0)|"]
3035 #[doc = "| 6 | Reserved (set to 0)|"]
3036 #[doc = "| 7 | Reserved (set to 0)|"]
3037 MAV_CMD_LOGGING_STOP = 2511,
3038 #[doc = ""]
3039 #[doc = "# Parameters"]
3040 #[doc = ""]
3041 #[doc = "| Parameter | Description | Values |"]
3042 #[doc = "| --------- | ----------- | ------ |"]
3043 #[doc = "| 1 (Landing Gear ID)| Landing gear ID (default: 0, -1 for all)| -1, 0, .. |"]
3044 #[doc = "| 2 (Landing Gear Position)| Landing gear position (Down: 0, Up: 1, NaN for no change)| |"]
3045 #[doc = "| 3 | | Reserved (use NaN) |"]
3046 #[doc = "| 4 | | Reserved (use NaN) |"]
3047 #[doc = "| 5 | | |"]
3048 #[doc = "| 6 | | |"]
3049 #[doc = "| 7 | | Reserved (use NaN) |"]
3050 MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
3051 #[doc = "Request to start/stop transmitting over the high latency telemetry"]
3052 #[doc = ""]
3053 #[doc = "# Parameters"]
3054 #[doc = ""]
3055 #[doc = "| Parameter | Description | Values |"]
3056 #[doc = "| --------- | ----------- | ------ |"]
3057 #[doc = "| 1 (Enable)| Control transmission over high latency telemetry (0: stop, 1: start)| 0, 1 |"]
3058 #[doc = "| 2 | Empty | |"]
3059 #[doc = "| 3 | Empty | |"]
3060 #[doc = "| 4 | Empty | |"]
3061 #[doc = "| 5 | Empty | |"]
3062 #[doc = "| 6 | Empty | |"]
3063 #[doc = "| 7 | Empty | |"]
3064 MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
3065 #[doc = "Create a panorama at the current position"]
3066 #[doc = ""]
3067 #[doc = "# Parameters"]
3068 #[doc = ""]
3069 #[doc = "| Parameter | Description | Units |"]
3070 #[doc = "| --------- | ----------- | ----- |"]
3071 #[doc = "| 1 (Horizontal Angle)| Viewing angle horizontal of the panorama (+- 0.5 the total angle)| deg |"]
3072 #[doc = "| 2 (Vertical Angle)| Viewing angle vertical of panorama.| deg |"]
3073 #[doc = "| 3 (Horizontal Speed)| Speed of the horizontal rotation.| deg/s |"]
3074 #[doc = "| 4 (Vertical Speed)| Speed of the vertical rotation.| deg/s |"]
3075 MAV_CMD_PANORAMA_CREATE = 2800,
3076 #[doc = "Request VTOL transition"]
3077 #[doc = ""]
3078 #[doc = "# Parameters"]
3079 #[doc = ""]
3080 #[doc = "| Parameter | Description | Values |"]
3081 #[doc = "| --------- | ----------- | ------ |"]
3082 #[doc = "| 1 (State) | The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| [`MavVtolState`] |"]
3083 #[doc = "| 2 (Immediate)| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency \"Quadchute\". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| |"]
3084 MAV_CMD_DO_VTOL_TRANSITION = 3000,
3085 #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
3086 #[doc = ""]
3087 #[doc = "# Parameters"]
3088 #[doc = ""]
3089 #[doc = "| Parameter | Description | Values |"]
3090 #[doc = "| --------- | ----------- | ------ |"]
3091 #[doc = "| 1 (System ID)| Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| 0, 1, .. , 255 |"]
3092 MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
3093 #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
3094 MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
3095 #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
3096 #[doc = ""]
3097 #[doc = "# Parameters"]
3098 #[doc = ""]
3099 #[doc = "| Parameter | Description | Units |"]
3100 #[doc = "| --------- | ----------- | ----- |"]
3101 #[doc = "| 1 (Radius)| Radius of desired circle in CIRCLE_MODE| m |"]
3102 #[doc = "| 2 | User defined| |"]
3103 #[doc = "| 3 | User defined| |"]
3104 #[doc = "| 4 | User defined| |"]
3105 #[doc = "| 5 (Latitude)| Target latitude of center of circle in CIRCLE_MODE| degE7 |"]
3106 #[doc = "| 6 (Longitude)| Target longitude of center of circle in CIRCLE_MODE| degE7 |"]
3107 MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
3108 #[doc = "Delay mission state machine until gate has been reached."]
3109 #[doc = ""]
3110 #[doc = "# Parameters"]
3111 #[doc = ""]
3112 #[doc = "| Parameter | Description | Values | Units |"]
3113 #[doc = "| --------- | ----------- | ------ | ----- |"]
3114 #[doc = "| 1 (Geometry)| Geometry: 0: orthogonal to path between previous and next waypoint.| 0, 1, .. | |"]
3115 #[doc = "| 2 (UseAltitude)| Altitude: 0: ignore altitude| 0, 1 | |"]
3116 #[doc = "| 3 | Empty | | |"]
3117 #[doc = "| 4 | Empty | | |"]
3118 #[doc = "| 5 (Latitude)| Latitude | | |"]
3119 #[doc = "| 6 (Longitude)| Longitude | | |"]
3120 #[doc = "| 7 (Altitude)| Altitude | | m |"]
3121 MAV_CMD_CONDITION_GATE = 4501,
3122 #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
3123 #[doc = ""]
3124 #[doc = "# Parameters"]
3125 #[doc = ""]
3126 #[doc = "| Parameter | Description | Units |"]
3127 #[doc = "| --------- | ----------- | ----- |"]
3128 #[doc = "| 1 | Reserved | |"]
3129 #[doc = "| 2 | Reserved | |"]
3130 #[doc = "| 3 | Reserved | |"]
3131 #[doc = "| 4 | Reserved | |"]
3132 #[doc = "| 5 (Latitude)| Latitude | |"]
3133 #[doc = "| 6 (Longitude)| Longitude | |"]
3134 #[doc = "| 7 (Altitude)| Altitude | m |"]
3135 MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
3136 #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
3137 #[doc = ""]
3138 #[doc = "# Parameters"]
3139 #[doc = ""]
3140 #[doc = "| Parameter | Description | Values |"]
3141 #[doc = "| --------- | ----------- | ------ |"]
3142 #[doc = "| 1 (Vertex Count)| Polygon vertex count. This is the number of vertices in the current polygon (all vertices will have the same number).| 3, 4, .. |"]
3143 #[doc = "| 2 (Inclusion Group)| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| 0, 1, .. |"]
3144 #[doc = "| 3 | Reserved | |"]
3145 #[doc = "| 4 | Reserved | |"]
3146 #[doc = "| 5 (Latitude)| Latitude | |"]
3147 #[doc = "| 6 (Longitude)| Longitude | |"]
3148 #[doc = "| 7 | Reserved | |"]
3149 MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
3150 #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
3151 #[doc = ""]
3152 #[doc = "# Parameters"]
3153 #[doc = ""]
3154 #[doc = "| Parameter | Description | Values |"]
3155 #[doc = "| --------- | ----------- | ------ |"]
3156 #[doc = "| 1 (Vertex Count)| Polygon vertex count. This is the number of vertices in the current polygon (all vertices will have the same number).| 3, 4, .. |"]
3157 #[doc = "| 2 | Reserved | |"]
3158 #[doc = "| 3 | Reserved | |"]
3159 #[doc = "| 4 | Reserved | |"]
3160 #[doc = "| 5 (Latitude)| Latitude | |"]
3161 #[doc = "| 6 (Longitude)| Longitude | |"]
3162 #[doc = "| 7 | Reserved | |"]
3163 MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
3164 #[doc = "Circular fence area. The vehicle must stay inside this area."]
3165 #[doc = ""]
3166 #[doc = "# Parameters"]
3167 #[doc = ""]
3168 #[doc = "| Parameter | Description | Values | Units |"]
3169 #[doc = "| --------- | ----------- | ------ | ----- |"]
3170 #[doc = "| 1 (Radius)| Radius. | | m |"]
3171 #[doc = "| 2 (Inclusion Group)| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| 0, 1, .. | |"]
3172 #[doc = "| 3 | Reserved | | |"]
3173 #[doc = "| 4 | Reserved | | |"]
3174 #[doc = "| 5 (Latitude)| Latitude | | |"]
3175 #[doc = "| 6 (Longitude)| Longitude | | |"]
3176 #[doc = "| 7 | Reserved | | |"]
3177 MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
3178 #[doc = "Circular fence area. The vehicle must stay outside this area."]
3179 #[doc = ""]
3180 #[doc = "# Parameters"]
3181 #[doc = ""]
3182 #[doc = "| Parameter | Description | Units |"]
3183 #[doc = "| --------- | ----------- | ----- |"]
3184 #[doc = "| 1 (Radius)| Radius. | m |"]
3185 #[doc = "| 2 | Reserved | |"]
3186 #[doc = "| 3 | Reserved | |"]
3187 #[doc = "| 4 | Reserved | |"]
3188 #[doc = "| 5 (Latitude)| Latitude | |"]
3189 #[doc = "| 6 (Longitude)| Longitude | |"]
3190 #[doc = "| 7 | Reserved | |"]
3191 MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
3192 #[doc = "Rally point. You can have multiple rally points defined."]
3193 #[doc = ""]
3194 #[doc = "# Parameters"]
3195 #[doc = ""]
3196 #[doc = "| Parameter | Description | Units |"]
3197 #[doc = "| --------- | ----------- | ----- |"]
3198 #[doc = "| 1 | Reserved | |"]
3199 #[doc = "| 2 | Reserved | |"]
3200 #[doc = "| 3 | Reserved | |"]
3201 #[doc = "| 4 | Reserved | |"]
3202 #[doc = "| 5 (Latitude)| Latitude | |"]
3203 #[doc = "| 6 (Longitude)| Longitude | |"]
3204 #[doc = "| 7 (Altitude)| Altitude | m |"]
3205 MAV_CMD_NAV_RALLY_POINT = 5100,
3206 #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
3207 #[doc = ""]
3208 #[doc = "# Parameters"]
3209 #[doc = ""]
3210 #[doc = "| Parameter | Description |"]
3211 #[doc = "| --------- | ----------- |"]
3212 #[doc = "| 1 | Reserved (set to 0)|"]
3213 #[doc = "| 2 | Reserved (set to 0)|"]
3214 #[doc = "| 3 | Reserved (set to 0)|"]
3215 #[doc = "| 4 | Reserved (set to 0)|"]
3216 #[doc = "| 5 | Reserved (set to 0)|"]
3217 #[doc = "| 6 | Reserved (set to 0)|"]
3218 #[doc = "| 7 | Reserved (set to 0)|"]
3219 MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
3220 #[doc = "Change state of safety switch."]
3221 #[doc = ""]
3222 #[doc = "# Parameters"]
3223 #[doc = ""]
3224 #[doc = "| Parameter | Description | Values |"]
3225 #[doc = "| --------- | ----------- | ------ |"]
3226 #[doc = "| 1 (Desired State)| New safety switch state.| [`SafetySwitchState`] |"]
3227 #[doc = "| 2 | Empty. | |"]
3228 #[doc = "| 3 | Empty. | |"]
3229 #[doc = "| 4 | Empty | |"]
3230 #[doc = "| 5 | Empty. | |"]
3231 #[doc = "| 6 | Empty. | |"]
3232 #[doc = "| 7 | Empty. | |"]
3233 MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
3234 #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
3235 #[doc = ""]
3236 #[doc = "# Parameters"]
3237 #[doc = ""]
3238 #[doc = "| Parameter | Description |"]
3239 #[doc = "| --------- | ----------- |"]
3240 #[doc = "| 1 | Reserved (set to 0)|"]
3241 #[doc = "| 2 | Reserved (set to 0)|"]
3242 #[doc = "| 3 | Reserved (set to 0)|"]
3243 #[doc = "| 4 | Reserved (set to 0)|"]
3244 #[doc = "| 5 | Reserved (set to 0)|"]
3245 #[doc = "| 6 | Reserved (set to 0)|"]
3246 #[doc = "| 7 | Reserved (set to 0)|"]
3247 MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
3248 #[deprecated = " (Deprecated since 2021-06)"]
3249 #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
3250 #[doc = ""]
3251 #[doc = "# Parameters"]
3252 #[doc = ""]
3253 #[doc = "| Parameter | Description | Values | Units |"]
3254 #[doc = "| --------- | ----------- | ------ | ----- |"]
3255 #[doc = "| 1 (Operation Mode)| Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| 0, 1, 2 | |"]
3256 #[doc = "| 2 (Approach Vector)| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| -1 .. 360 | deg |"]
3257 #[doc = "| 3 (Ground Speed)| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| ≥ -1 | |"]
3258 #[doc = "| 4 (Altitude Clearance)| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| ≥ -1 | m |"]
3259 #[doc = "| 5 (Latitude)| Latitude. | | degE7 |"]
3260 #[doc = "| 6 (Longitude)| Longitude. | | degE7 |"]
3261 #[doc = "| 7 (Altitude)| Altitude (MSL)| | m |"]
3262 MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
3263 #[deprecated = " (Deprecated since 2021-06)"]
3264 #[doc = "Control the payload deployment."]
3265 #[doc = ""]
3266 #[doc = "# Parameters"]
3267 #[doc = ""]
3268 #[doc = "| Parameter | Description | Values |"]
3269 #[doc = "| --------- | ----------- | ------ |"]
3270 #[doc = "| 1 (Operation Mode)| Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| 0, 1, .. , 101 |"]
3271 #[doc = "| 2 | Reserved | |"]
3272 #[doc = "| 3 | Reserved | |"]
3273 #[doc = "| 4 | Reserved | |"]
3274 #[doc = "| 5 | Reserved | |"]
3275 #[doc = "| 6 | Reserved | |"]
3276 #[doc = "| 7 | Reserved | |"]
3277 MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
3278 #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
3279 #[doc = ""]
3280 #[doc = "# Parameters"]
3281 #[doc = ""]
3282 #[doc = "| Parameter | Description | Units |"]
3283 #[doc = "| --------- | ----------- | ----- |"]
3284 #[doc = "| 1 (Yaw) | Yaw of vehicle in earth frame.| deg |"]
3285 #[doc = "| 2 (CompassMask)| CompassMask, 0 for all.| |"]
3286 #[doc = "| 3 (Latitude)| Latitude. | deg |"]
3287 #[doc = "| 4 (Longitude)| Longitude. | deg |"]
3288 #[doc = "| 5 | Empty. | |"]
3289 #[doc = "| 6 | Empty. | |"]
3290 #[doc = "| 7 | Empty. | |"]
3291 MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
3292 #[doc = "Command to operate winch."]
3293 #[doc = ""]
3294 #[doc = "# Parameters"]
3295 #[doc = ""]
3296 #[doc = "| Parameter | Description | Values | Units |"]
3297 #[doc = "| --------- | ----------- | ------ | ----- |"]
3298 #[doc = "| 1 (Instance)| Winch instance number.| 1, 2, .. | |"]
3299 #[doc = "| 2 (Action)| Action to perform.| [`WinchActions`] | |"]
3300 #[doc = "| 3 (Length)| Length of line to release (negative to wind).| | m |"]
3301 #[doc = "| 4 (Rate) | Release rate (negative to wind).| | m/s |"]
3302 #[doc = "| 5 | Empty. | | |"]
3303 #[doc = "| 6 | Empty. | | |"]
3304 #[doc = "| 7 | Empty. | | |"]
3305 MAV_CMD_DO_WINCH = 42600,
3306 #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
3307 #[doc = ""]
3308 #[doc = "# Parameters"]
3309 #[doc = ""]
3310 #[doc = "| Parameter | Description | Units |"]
3311 #[doc = "| --------- | ----------- | ----- |"]
3312 #[doc = "| 1 (transmission_time)| Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| s |"]
3313 #[doc = "| 2 (processing_time)| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| s |"]
3314 #[doc = "| 3 (accuracy)| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| |"]
3315 #[doc = "| 4 | Empty | |"]
3316 #[doc = "| 5 (Latitude)| Latitude | |"]
3317 #[doc = "| 6 (Longitude)| Longitude | |"]
3318 #[doc = "| 7 (Altitude)| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| m |"]
3319 MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
3320 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3321 #[doc = ""]
3322 #[doc = "# Parameters"]
3323 #[doc = ""]
3324 #[doc = "| Parameter | Description | Units |"]
3325 #[doc = "| --------- | ----------- | ----- |"]
3326 #[doc = "| 1 | User defined| |"]
3327 #[doc = "| 2 | User defined| |"]
3328 #[doc = "| 3 | User defined| |"]
3329 #[doc = "| 4 | User defined| |"]
3330 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3331 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3332 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3333 MAV_CMD_WAYPOINT_USER_1 = 31000,
3334 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3335 #[doc = ""]
3336 #[doc = "# Parameters"]
3337 #[doc = ""]
3338 #[doc = "| Parameter | Description | Units |"]
3339 #[doc = "| --------- | ----------- | ----- |"]
3340 #[doc = "| 1 | User defined| |"]
3341 #[doc = "| 2 | User defined| |"]
3342 #[doc = "| 3 | User defined| |"]
3343 #[doc = "| 4 | User defined| |"]
3344 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3345 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3346 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3347 MAV_CMD_WAYPOINT_USER_2 = 31001,
3348 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3349 #[doc = ""]
3350 #[doc = "# Parameters"]
3351 #[doc = ""]
3352 #[doc = "| Parameter | Description | Units |"]
3353 #[doc = "| --------- | ----------- | ----- |"]
3354 #[doc = "| 1 | User defined| |"]
3355 #[doc = "| 2 | User defined| |"]
3356 #[doc = "| 3 | User defined| |"]
3357 #[doc = "| 4 | User defined| |"]
3358 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3359 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3360 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3361 MAV_CMD_WAYPOINT_USER_3 = 31002,
3362 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3363 #[doc = ""]
3364 #[doc = "# Parameters"]
3365 #[doc = ""]
3366 #[doc = "| Parameter | Description | Units |"]
3367 #[doc = "| --------- | ----------- | ----- |"]
3368 #[doc = "| 1 | User defined| |"]
3369 #[doc = "| 2 | User defined| |"]
3370 #[doc = "| 3 | User defined| |"]
3371 #[doc = "| 4 | User defined| |"]
3372 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3373 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3374 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3375 MAV_CMD_WAYPOINT_USER_4 = 31003,
3376 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3377 #[doc = ""]
3378 #[doc = "# Parameters"]
3379 #[doc = ""]
3380 #[doc = "| Parameter | Description | Units |"]
3381 #[doc = "| --------- | ----------- | ----- |"]
3382 #[doc = "| 1 | User defined| |"]
3383 #[doc = "| 2 | User defined| |"]
3384 #[doc = "| 3 | User defined| |"]
3385 #[doc = "| 4 | User defined| |"]
3386 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3387 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3388 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3389 MAV_CMD_WAYPOINT_USER_5 = 31004,
3390 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3391 #[doc = ""]
3392 #[doc = "# Parameters"]
3393 #[doc = ""]
3394 #[doc = "| Parameter | Description | Units |"]
3395 #[doc = "| --------- | ----------- | ----- |"]
3396 #[doc = "| 1 | User defined| |"]
3397 #[doc = "| 2 | User defined| |"]
3398 #[doc = "| 3 | User defined| |"]
3399 #[doc = "| 4 | User defined| |"]
3400 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3401 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3402 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3403 MAV_CMD_SPATIAL_USER_1 = 31005,
3404 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3405 #[doc = ""]
3406 #[doc = "# Parameters"]
3407 #[doc = ""]
3408 #[doc = "| Parameter | Description | Units |"]
3409 #[doc = "| --------- | ----------- | ----- |"]
3410 #[doc = "| 1 | User defined| |"]
3411 #[doc = "| 2 | User defined| |"]
3412 #[doc = "| 3 | User defined| |"]
3413 #[doc = "| 4 | User defined| |"]
3414 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3415 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3416 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3417 MAV_CMD_SPATIAL_USER_2 = 31006,
3418 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3419 #[doc = ""]
3420 #[doc = "# Parameters"]
3421 #[doc = ""]
3422 #[doc = "| Parameter | Description | Units |"]
3423 #[doc = "| --------- | ----------- | ----- |"]
3424 #[doc = "| 1 | User defined| |"]
3425 #[doc = "| 2 | User defined| |"]
3426 #[doc = "| 3 | User defined| |"]
3427 #[doc = "| 4 | User defined| |"]
3428 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3429 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3430 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3431 MAV_CMD_SPATIAL_USER_3 = 31007,
3432 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3433 #[doc = ""]
3434 #[doc = "# Parameters"]
3435 #[doc = ""]
3436 #[doc = "| Parameter | Description | Units |"]
3437 #[doc = "| --------- | ----------- | ----- |"]
3438 #[doc = "| 1 | User defined| |"]
3439 #[doc = "| 2 | User defined| |"]
3440 #[doc = "| 3 | User defined| |"]
3441 #[doc = "| 4 | User defined| |"]
3442 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3443 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3444 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3445 MAV_CMD_SPATIAL_USER_4 = 31008,
3446 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3447 #[doc = ""]
3448 #[doc = "# Parameters"]
3449 #[doc = ""]
3450 #[doc = "| Parameter | Description | Units |"]
3451 #[doc = "| --------- | ----------- | ----- |"]
3452 #[doc = "| 1 | User defined| |"]
3453 #[doc = "| 2 | User defined| |"]
3454 #[doc = "| 3 | User defined| |"]
3455 #[doc = "| 4 | User defined| |"]
3456 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3457 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3458 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3459 MAV_CMD_SPATIAL_USER_5 = 31009,
3460 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3461 #[doc = ""]
3462 #[doc = "# Parameters"]
3463 #[doc = ""]
3464 #[doc = "| Parameter | Description |"]
3465 #[doc = "| --------- | ----------- |"]
3466 #[doc = "| 1 | User defined|"]
3467 #[doc = "| 2 | User defined|"]
3468 #[doc = "| 3 | User defined|"]
3469 #[doc = "| 4 | User defined|"]
3470 #[doc = "| 5 | User defined|"]
3471 #[doc = "| 6 | User defined|"]
3472 #[doc = "| 7 | User defined|"]
3473 MAV_CMD_USER_1 = 31010,
3474 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3475 #[doc = ""]
3476 #[doc = "# Parameters"]
3477 #[doc = ""]
3478 #[doc = "| Parameter | Description |"]
3479 #[doc = "| --------- | ----------- |"]
3480 #[doc = "| 1 | User defined|"]
3481 #[doc = "| 2 | User defined|"]
3482 #[doc = "| 3 | User defined|"]
3483 #[doc = "| 4 | User defined|"]
3484 #[doc = "| 5 | User defined|"]
3485 #[doc = "| 6 | User defined|"]
3486 #[doc = "| 7 | User defined|"]
3487 MAV_CMD_USER_2 = 31011,
3488 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3489 #[doc = ""]
3490 #[doc = "# Parameters"]
3491 #[doc = ""]
3492 #[doc = "| Parameter | Description |"]
3493 #[doc = "| --------- | ----------- |"]
3494 #[doc = "| 1 | User defined|"]
3495 #[doc = "| 2 | User defined|"]
3496 #[doc = "| 3 | User defined|"]
3497 #[doc = "| 4 | User defined|"]
3498 #[doc = "| 5 | User defined|"]
3499 #[doc = "| 6 | User defined|"]
3500 #[doc = "| 7 | User defined|"]
3501 MAV_CMD_USER_3 = 31012,
3502 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3503 #[doc = ""]
3504 #[doc = "# Parameters"]
3505 #[doc = ""]
3506 #[doc = "| Parameter | Description |"]
3507 #[doc = "| --------- | ----------- |"]
3508 #[doc = "| 1 | User defined|"]
3509 #[doc = "| 2 | User defined|"]
3510 #[doc = "| 3 | User defined|"]
3511 #[doc = "| 4 | User defined|"]
3512 #[doc = "| 5 | User defined|"]
3513 #[doc = "| 6 | User defined|"]
3514 #[doc = "| 7 | User defined|"]
3515 MAV_CMD_USER_4 = 31013,
3516 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3517 #[doc = ""]
3518 #[doc = "# Parameters"]
3519 #[doc = ""]
3520 #[doc = "| Parameter | Description |"]
3521 #[doc = "| --------- | ----------- |"]
3522 #[doc = "| 1 | User defined|"]
3523 #[doc = "| 2 | User defined|"]
3524 #[doc = "| 3 | User defined|"]
3525 #[doc = "| 4 | User defined|"]
3526 #[doc = "| 5 | User defined|"]
3527 #[doc = "| 6 | User defined|"]
3528 #[doc = "| 7 | User defined|"]
3529 MAV_CMD_USER_5 = 31014,
3530 #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
3531 #[doc = ""]
3532 #[doc = "# Parameters"]
3533 #[doc = ""]
3534 #[doc = "| Parameter | Description |"]
3535 #[doc = "| --------- | ----------- |"]
3536 #[doc = "| 1 (bus) | Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).|"]
3537 #[doc = "| 2 | Empty. |"]
3538 #[doc = "| 3 | Empty. |"]
3539 #[doc = "| 4 | Empty. |"]
3540 #[doc = "| 5 | Empty. |"]
3541 #[doc = "| 6 | Empty. |"]
3542 #[doc = "| 7 | Empty. |"]
3543 MAV_CMD_CAN_FORWARD = 32000,
3544}
3545impl MavCmd {
3546 pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
3547}
3548impl Default for MavCmd {
3549 fn default() -> Self {
3550 Self::DEFAULT
3551 }
3552}
3553#[cfg_attr(feature = "ts", derive(TS))]
3554#[cfg_attr(feature = "ts", ts(export))]
3555#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3557#[cfg_attr(feature = "serde", serde(tag = "type"))]
3558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3559#[repr(u32)]
3560#[doc = "Possible actions an aircraft can take to avoid a collision."]
3561pub enum MavCollisionAction {
3562 #[doc = "Ignore any potential collisions"]
3563 MAV_COLLISION_ACTION_NONE = 0,
3564 #[doc = "Report potential collision"]
3565 MAV_COLLISION_ACTION_REPORT = 1,
3566 #[doc = "Ascend or Descend to avoid threat"]
3567 MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
3568 #[doc = "Move horizontally to avoid threat"]
3569 MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
3570 #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
3571 MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
3572 #[doc = "Aircraft to fly directly back to its launch point"]
3573 MAV_COLLISION_ACTION_RTL = 5,
3574 #[doc = "Aircraft to stop in place"]
3575 MAV_COLLISION_ACTION_HOVER = 6,
3576}
3577impl MavCollisionAction {
3578 pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
3579}
3580impl Default for MavCollisionAction {
3581 fn default() -> Self {
3582 Self::DEFAULT
3583 }
3584}
3585#[cfg_attr(feature = "ts", derive(TS))]
3586#[cfg_attr(feature = "ts", ts(export))]
3587#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3589#[cfg_attr(feature = "serde", serde(tag = "type"))]
3590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3591#[repr(u32)]
3592#[doc = "Source of information about this collision."]
3593pub enum MavCollisionSrc {
3594 #[doc = "ID field references ADSB_VEHICLE packets"]
3595 MAV_COLLISION_SRC_ADSB = 0,
3596 #[doc = "ID field references MAVLink SRC ID"]
3597 MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
3598}
3599impl MavCollisionSrc {
3600 pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
3601}
3602impl Default for MavCollisionSrc {
3603 fn default() -> Self {
3604 Self::DEFAULT
3605 }
3606}
3607#[cfg_attr(feature = "ts", derive(TS))]
3608#[cfg_attr(feature = "ts", ts(export))]
3609#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3611#[cfg_attr(feature = "serde", serde(tag = "type"))]
3612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3613#[repr(u32)]
3614#[doc = "Aircraft-rated danger from this threat."]
3615pub enum MavCollisionThreatLevel {
3616 #[doc = "Not a threat"]
3617 MAV_COLLISION_THREAT_LEVEL_NONE = 0,
3618 #[doc = "Craft is mildly concerned about this threat"]
3619 MAV_COLLISION_THREAT_LEVEL_LOW = 1,
3620 #[doc = "Craft is panicking, and may take actions to avoid threat"]
3621 MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
3622}
3623impl MavCollisionThreatLevel {
3624 pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
3625}
3626impl Default for MavCollisionThreatLevel {
3627 fn default() -> Self {
3628 Self::DEFAULT
3629 }
3630}
3631#[cfg_attr(feature = "ts", derive(TS))]
3632#[cfg_attr(feature = "ts", ts(export))]
3633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3635#[cfg_attr(feature = "serde", serde(tag = "type"))]
3636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3637#[repr(u32)]
3638#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.). Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components. When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
3639pub enum MavComponent {
3640 #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
3641 MAV_COMP_ID_ALL = 0,
3642 #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
3643 MAV_COMP_ID_AUTOPILOT1 = 1,
3644 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3645 MAV_COMP_ID_USER1 = 25,
3646 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3647 MAV_COMP_ID_USER2 = 26,
3648 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3649 MAV_COMP_ID_USER3 = 27,
3650 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3651 MAV_COMP_ID_USER4 = 28,
3652 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3653 MAV_COMP_ID_USER5 = 29,
3654 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3655 MAV_COMP_ID_USER6 = 30,
3656 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3657 MAV_COMP_ID_USER7 = 31,
3658 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3659 MAV_COMP_ID_USER8 = 32,
3660 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3661 MAV_COMP_ID_USER9 = 33,
3662 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3663 MAV_COMP_ID_USER10 = 34,
3664 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3665 MAV_COMP_ID_USER11 = 35,
3666 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3667 MAV_COMP_ID_USER12 = 36,
3668 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3669 MAV_COMP_ID_USER13 = 37,
3670 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3671 MAV_COMP_ID_USER14 = 38,
3672 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3673 MAV_COMP_ID_USER15 = 39,
3674 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3675 MAV_COMP_ID_USER16 = 40,
3676 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3677 MAV_COMP_ID_USER17 = 41,
3678 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3679 MAV_COMP_ID_USER18 = 42,
3680 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3681 MAV_COMP_ID_USER19 = 43,
3682 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3683 MAV_COMP_ID_USER20 = 44,
3684 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3685 MAV_COMP_ID_USER21 = 45,
3686 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3687 MAV_COMP_ID_USER22 = 46,
3688 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3689 MAV_COMP_ID_USER23 = 47,
3690 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3691 MAV_COMP_ID_USER24 = 48,
3692 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3693 MAV_COMP_ID_USER25 = 49,
3694 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3695 MAV_COMP_ID_USER26 = 50,
3696 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3697 MAV_COMP_ID_USER27 = 51,
3698 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3699 MAV_COMP_ID_USER28 = 52,
3700 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3701 MAV_COMP_ID_USER29 = 53,
3702 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3703 MAV_COMP_ID_USER30 = 54,
3704 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3705 MAV_COMP_ID_USER31 = 55,
3706 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3707 MAV_COMP_ID_USER32 = 56,
3708 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3709 MAV_COMP_ID_USER33 = 57,
3710 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3711 MAV_COMP_ID_USER34 = 58,
3712 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3713 MAV_COMP_ID_USER35 = 59,
3714 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3715 MAV_COMP_ID_USER36 = 60,
3716 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3717 MAV_COMP_ID_USER37 = 61,
3718 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3719 MAV_COMP_ID_USER38 = 62,
3720 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3721 MAV_COMP_ID_USER39 = 63,
3722 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3723 MAV_COMP_ID_USER40 = 64,
3724 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3725 MAV_COMP_ID_USER41 = 65,
3726 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3727 MAV_COMP_ID_USER42 = 66,
3728 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3729 MAV_COMP_ID_USER43 = 67,
3730 #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
3731 MAV_COMP_ID_TELEMETRY_RADIO = 68,
3732 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3733 MAV_COMP_ID_USER45 = 69,
3734 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3735 MAV_COMP_ID_USER46 = 70,
3736 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3737 MAV_COMP_ID_USER47 = 71,
3738 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3739 MAV_COMP_ID_USER48 = 72,
3740 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3741 MAV_COMP_ID_USER49 = 73,
3742 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3743 MAV_COMP_ID_USER50 = 74,
3744 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3745 MAV_COMP_ID_USER51 = 75,
3746 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3747 MAV_COMP_ID_USER52 = 76,
3748 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3749 MAV_COMP_ID_USER53 = 77,
3750 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3751 MAV_COMP_ID_USER54 = 78,
3752 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3753 MAV_COMP_ID_USER55 = 79,
3754 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3755 MAV_COMP_ID_USER56 = 80,
3756 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3757 MAV_COMP_ID_USER57 = 81,
3758 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3759 MAV_COMP_ID_USER58 = 82,
3760 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3761 MAV_COMP_ID_USER59 = 83,
3762 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3763 MAV_COMP_ID_USER60 = 84,
3764 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3765 MAV_COMP_ID_USER61 = 85,
3766 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3767 MAV_COMP_ID_USER62 = 86,
3768 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3769 MAV_COMP_ID_USER63 = 87,
3770 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3771 MAV_COMP_ID_USER64 = 88,
3772 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3773 MAV_COMP_ID_USER65 = 89,
3774 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3775 MAV_COMP_ID_USER66 = 90,
3776 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3777 MAV_COMP_ID_USER67 = 91,
3778 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3779 MAV_COMP_ID_USER68 = 92,
3780 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3781 MAV_COMP_ID_USER69 = 93,
3782 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3783 MAV_COMP_ID_USER70 = 94,
3784 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3785 MAV_COMP_ID_USER71 = 95,
3786 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3787 MAV_COMP_ID_USER72 = 96,
3788 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3789 MAV_COMP_ID_USER73 = 97,
3790 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3791 MAV_COMP_ID_USER74 = 98,
3792 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3793 MAV_COMP_ID_USER75 = 99,
3794 #[doc = "Camera #1."]
3795 MAV_COMP_ID_CAMERA = 100,
3796 #[doc = "Camera #2."]
3797 MAV_COMP_ID_CAMERA2 = 101,
3798 #[doc = "Camera #3."]
3799 MAV_COMP_ID_CAMERA3 = 102,
3800 #[doc = "Camera #4."]
3801 MAV_COMP_ID_CAMERA4 = 103,
3802 #[doc = "Camera #5."]
3803 MAV_COMP_ID_CAMERA5 = 104,
3804 #[doc = "Camera #6."]
3805 MAV_COMP_ID_CAMERA6 = 105,
3806 #[doc = "Servo #1."]
3807 MAV_COMP_ID_SERVO1 = 140,
3808 #[doc = "Servo #2."]
3809 MAV_COMP_ID_SERVO2 = 141,
3810 #[doc = "Servo #3."]
3811 MAV_COMP_ID_SERVO3 = 142,
3812 #[doc = "Servo #4."]
3813 MAV_COMP_ID_SERVO4 = 143,
3814 #[doc = "Servo #5."]
3815 MAV_COMP_ID_SERVO5 = 144,
3816 #[doc = "Servo #6."]
3817 MAV_COMP_ID_SERVO6 = 145,
3818 #[doc = "Servo #7."]
3819 MAV_COMP_ID_SERVO7 = 146,
3820 #[doc = "Servo #8."]
3821 MAV_COMP_ID_SERVO8 = 147,
3822 #[doc = "Servo #9."]
3823 MAV_COMP_ID_SERVO9 = 148,
3824 #[doc = "Servo #10."]
3825 MAV_COMP_ID_SERVO10 = 149,
3826 #[doc = "Servo #11."]
3827 MAV_COMP_ID_SERVO11 = 150,
3828 #[doc = "Servo #12."]
3829 MAV_COMP_ID_SERVO12 = 151,
3830 #[doc = "Servo #13."]
3831 MAV_COMP_ID_SERVO13 = 152,
3832 #[doc = "Servo #14."]
3833 MAV_COMP_ID_SERVO14 = 153,
3834 #[doc = "Gimbal #1."]
3835 MAV_COMP_ID_GIMBAL = 154,
3836 #[doc = "Logging component."]
3837 MAV_COMP_ID_LOG = 155,
3838 #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
3839 MAV_COMP_ID_ADSB = 156,
3840 #[doc = "On Screen Display (OSD) devices for video links."]
3841 MAV_COMP_ID_OSD = 157,
3842 #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
3843 MAV_COMP_ID_PERIPHERAL = 158,
3844 #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
3845 #[doc = "Gimbal ID for QX1."]
3846 MAV_COMP_ID_QX1_GIMBAL = 159,
3847 #[doc = "FLARM collision alert component."]
3848 MAV_COMP_ID_FLARM = 160,
3849 #[doc = "Parachute component."]
3850 MAV_COMP_ID_PARACHUTE = 161,
3851 #[doc = "Winch component."]
3852 MAV_COMP_ID_WINCH = 169,
3853 #[doc = "Gimbal #2."]
3854 MAV_COMP_ID_GIMBAL2 = 171,
3855 #[doc = "Gimbal #3."]
3856 MAV_COMP_ID_GIMBAL3 = 172,
3857 #[doc = "Gimbal #4"]
3858 MAV_COMP_ID_GIMBAL4 = 173,
3859 #[doc = "Gimbal #5."]
3860 MAV_COMP_ID_GIMBAL5 = 174,
3861 #[doc = "Gimbal #6."]
3862 MAV_COMP_ID_GIMBAL6 = 175,
3863 #[doc = "Battery #1."]
3864 MAV_COMP_ID_BATTERY = 180,
3865 #[doc = "Battery #2."]
3866 MAV_COMP_ID_BATTERY2 = 181,
3867 #[doc = "CAN over MAVLink client."]
3868 MAV_COMP_ID_MAVCAN = 189,
3869 #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
3870 MAV_COMP_ID_MISSIONPLANNER = 190,
3871 #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3872 MAV_COMP_ID_ONBOARD_COMPUTER = 191,
3873 #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3874 MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
3875 #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3876 MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
3877 #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3878 MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
3879 #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
3880 MAV_COMP_ID_PATHPLANNER = 195,
3881 #[doc = "Component that plans a collision free path between two points."]
3882 MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
3883 #[doc = "Component that provides position estimates using VIO techniques."]
3884 MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
3885 #[doc = "Component that manages pairing of vehicle and GCS."]
3886 MAV_COMP_ID_PAIRING_MANAGER = 198,
3887 #[doc = "Inertial Measurement Unit (IMU) #1."]
3888 MAV_COMP_ID_IMU = 200,
3889 #[doc = "Inertial Measurement Unit (IMU) #2."]
3890 MAV_COMP_ID_IMU_2 = 201,
3891 #[doc = "Inertial Measurement Unit (IMU) #3."]
3892 MAV_COMP_ID_IMU_3 = 202,
3893 #[doc = "GPS #1."]
3894 MAV_COMP_ID_GPS = 220,
3895 #[doc = "GPS #2."]
3896 MAV_COMP_ID_GPS2 = 221,
3897 #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3898 MAV_COMP_ID_ODID_TXRX_1 = 236,
3899 #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3900 MAV_COMP_ID_ODID_TXRX_2 = 237,
3901 #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3902 MAV_COMP_ID_ODID_TXRX_3 = 238,
3903 #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
3904 MAV_COMP_ID_UDP_BRIDGE = 240,
3905 #[doc = "Component to bridge to UART (i.e. from UDP)."]
3906 MAV_COMP_ID_UART_BRIDGE = 241,
3907 #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
3908 MAV_COMP_ID_TUNNEL_NODE = 242,
3909 #[doc = "Illuminator"]
3910 MAV_COMP_ID_ILLUMINATOR = 243,
3911 #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
3912 #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
3913 MAV_COMP_ID_SYSTEM_CONTROL = 250,
3914}
3915impl MavComponent {
3916 pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
3917}
3918impl Default for MavComponent {
3919 fn default() -> Self {
3920 Self::DEFAULT
3921 }
3922}
3923#[cfg_attr(feature = "ts", derive(TS))]
3924#[cfg_attr(feature = "ts", ts(export))]
3925#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3927#[cfg_attr(feature = "serde", serde(tag = "type"))]
3928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3929#[repr(u32)]
3930#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
3931#[doc = "A data stream is not a fixed set of messages, but rather a recommendation to the autopilot software. Individual autopilots may or may not obey the recommended messages."]
3932pub enum MavDataStream {
3933 #[doc = "Enable all data streams"]
3934 MAV_DATA_STREAM_ALL = 0,
3935 #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
3936 MAV_DATA_STREAM_RAW_SENSORS = 1,
3937 #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
3938 MAV_DATA_STREAM_EXTENDED_STATUS = 2,
3939 #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
3940 MAV_DATA_STREAM_RC_CHANNELS = 3,
3941 #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
3942 MAV_DATA_STREAM_RAW_CONTROLLER = 4,
3943 #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
3944 MAV_DATA_STREAM_POSITION = 6,
3945 #[doc = "Dependent on the autopilot"]
3946 MAV_DATA_STREAM_EXTRA1 = 10,
3947 #[doc = "Dependent on the autopilot"]
3948 MAV_DATA_STREAM_EXTRA2 = 11,
3949 #[doc = "Dependent on the autopilot"]
3950 MAV_DATA_STREAM_EXTRA3 = 12,
3951}
3952impl MavDataStream {
3953 pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
3954}
3955impl Default for MavDataStream {
3956 fn default() -> Self {
3957 Self::DEFAULT
3958 }
3959}
3960#[cfg_attr(feature = "ts", derive(TS))]
3961#[cfg_attr(feature = "ts", ts(export))]
3962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3964#[cfg_attr(feature = "serde", serde(tag = "type"))]
3965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3966#[repr(u32)]
3967#[doc = "Enumeration of distance sensor types"]
3968pub enum MavDistanceSensor {
3969 #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
3970 MAV_DISTANCE_SENSOR_LASER = 0,
3971 #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
3972 MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
3973 #[doc = "Infrared rangefinder, e.g. Sharp units"]
3974 MAV_DISTANCE_SENSOR_INFRARED = 2,
3975 #[doc = "Radar type, e.g. uLanding units"]
3976 MAV_DISTANCE_SENSOR_RADAR = 3,
3977 #[doc = "Broken or unknown type, e.g. analog units"]
3978 MAV_DISTANCE_SENSOR_UNKNOWN = 4,
3979}
3980impl MavDistanceSensor {
3981 pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
3982}
3983impl Default for MavDistanceSensor {
3984 fn default() -> Self {
3985 Self::DEFAULT
3986 }
3987}
3988#[cfg_attr(feature = "ts", derive(TS))]
3989#[cfg_attr(feature = "ts", ts(export))]
3990#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3992#[cfg_attr(feature = "serde", serde(tag = "type"))]
3993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3994#[repr(u32)]
3995#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
3996pub enum MavDoRepositionFlags {
3997 #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
3998 MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
3999}
4000impl MavDoRepositionFlags {
4001 pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
4002}
4003impl Default for MavDoRepositionFlags {
4004 fn default() -> Self {
4005 Self::DEFAULT
4006 }
4007}
4008#[cfg_attr(feature = "ts", derive(TS))]
4009#[cfg_attr(feature = "ts", ts(export))]
4010#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4012#[cfg_attr(feature = "serde", serde(tag = "type"))]
4013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4014#[repr(u32)]
4015#[doc = "Enumeration of estimator types"]
4016pub enum MavEstimatorType {
4017 #[doc = "Unknown type of the estimator."]
4018 MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
4019 #[doc = "This is a naive estimator without any real covariance feedback."]
4020 MAV_ESTIMATOR_TYPE_NAIVE = 1,
4021 #[doc = "Computer vision based estimate. Might be up to scale."]
4022 MAV_ESTIMATOR_TYPE_VISION = 2,
4023 #[doc = "Visual-inertial estimate."]
4024 MAV_ESTIMATOR_TYPE_VIO = 3,
4025 #[doc = "Plain GPS estimate."]
4026 MAV_ESTIMATOR_TYPE_GPS = 4,
4027 #[doc = "Estimator integrating GPS and inertial sensing."]
4028 MAV_ESTIMATOR_TYPE_GPS_INS = 5,
4029 #[doc = "Estimate from external motion capturing system."]
4030 MAV_ESTIMATOR_TYPE_MOCAP = 6,
4031 #[doc = "Estimator based on lidar sensor input."]
4032 MAV_ESTIMATOR_TYPE_LIDAR = 7,
4033 #[doc = "Estimator on autopilot."]
4034 MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
4035}
4036impl MavEstimatorType {
4037 pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
4038}
4039impl Default for MavEstimatorType {
4040 fn default() -> Self {
4041 Self::DEFAULT
4042 }
4043}
4044#[cfg_attr(feature = "ts", derive(TS))]
4045#[cfg_attr(feature = "ts", ts(export))]
4046#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4048#[cfg_attr(feature = "serde", serde(tag = "type"))]
4049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4050#[repr(u32)]
4051#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
4052pub enum MavEventCurrentSequenceFlags {
4053 #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
4054 MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
4055}
4056impl MavEventCurrentSequenceFlags {
4057 pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
4058}
4059impl Default for MavEventCurrentSequenceFlags {
4060 fn default() -> Self {
4061 Self::DEFAULT
4062 }
4063}
4064#[cfg_attr(feature = "ts", derive(TS))]
4065#[cfg_attr(feature = "ts", ts(export))]
4066#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4068#[cfg_attr(feature = "serde", serde(tag = "type"))]
4069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4070#[repr(u32)]
4071#[doc = "Reason for an event error response."]
4072pub enum MavEventErrorReason {
4073 #[doc = "The requested event is not available (anymore)."]
4074 MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
4075}
4076impl MavEventErrorReason {
4077 pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
4078}
4079impl Default for MavEventErrorReason {
4080 fn default() -> Self {
4081 Self::DEFAULT
4082 }
4083}
4084#[cfg_attr(feature = "ts", derive(TS))]
4085#[cfg_attr(feature = "ts", ts(export))]
4086#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4088#[cfg_attr(feature = "serde", serde(tag = "type"))]
4089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4090#[repr(u32)]
4091#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles. Global frames use the following naming conventions: - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default. The following modifiers may be used with \"GLOBAL\": - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL. - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL. - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7. Local frames use the following naming conventions: - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\"). - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude. - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames. Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
4092pub enum MavFrame {
4093 #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
4094 MAV_FRAME_GLOBAL = 0,
4095 #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
4096 MAV_FRAME_LOCAL_NED = 1,
4097 #[doc = "NOT a coordinate frame, indicates a mission command."]
4098 MAV_FRAME_MISSION = 2,
4099 #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
4100 MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
4101 #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
4102 MAV_FRAME_LOCAL_ENU = 4,
4103 #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
4104 #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
4105 MAV_FRAME_GLOBAL_INT = 5,
4106 #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
4107 #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
4108 MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
4109 #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
4110 MAV_FRAME_LOCAL_OFFSET_NED = 7,
4111 #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
4112 #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
4113 MAV_FRAME_BODY_NED = 8,
4114 #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
4115 #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
4116 MAV_FRAME_BODY_OFFSET_NED = 9,
4117 #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
4118 MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
4119 #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
4120 #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
4121 MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
4122 #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
4123 MAV_FRAME_BODY_FRD = 12,
4124 #[deprecated = " (Deprecated since 2019-04)"]
4125 #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
4126 MAV_FRAME_RESERVED_13 = 13,
4127 #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4128 #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
4129 MAV_FRAME_RESERVED_14 = 14,
4130 #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4131 #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
4132 MAV_FRAME_RESERVED_15 = 15,
4133 #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4134 #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
4135 MAV_FRAME_RESERVED_16 = 16,
4136 #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4137 #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
4138 MAV_FRAME_RESERVED_17 = 17,
4139 #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4140 #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
4141 MAV_FRAME_RESERVED_18 = 18,
4142 #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4143 #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
4144 MAV_FRAME_RESERVED_19 = 19,
4145 #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
4146 MAV_FRAME_LOCAL_FRD = 20,
4147 #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
4148 MAV_FRAME_LOCAL_FLU = 21,
4149}
4150impl MavFrame {
4151 pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
4152}
4153impl Default for MavFrame {
4154 fn default() -> Self {
4155 Self::DEFAULT
4156 }
4157}
4158#[cfg_attr(feature = "ts", derive(TS))]
4159#[cfg_attr(feature = "ts", ts(export))]
4160#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4162#[cfg_attr(feature = "serde", serde(tag = "type"))]
4163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4164#[repr(u32)]
4165#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
4166pub enum MavFtpErr {
4167 #[doc = "None: No error"]
4168 MAV_FTP_ERR_NONE = 0,
4169 #[doc = "Fail: Unknown failure"]
4170 MAV_FTP_ERR_FAIL = 1,
4171 #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
4172 MAV_FTP_ERR_FAILERRNO = 2,
4173 #[doc = "InvalidDataSize: Payload size is invalid"]
4174 MAV_FTP_ERR_INVALIDDATASIZE = 3,
4175 #[doc = "InvalidSession: Session is not currently open"]
4176 MAV_FTP_ERR_INVALIDSESSION = 4,
4177 #[doc = "NoSessionsAvailable: All available sessions are already in use"]
4178 MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
4179 #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
4180 MAV_FTP_ERR_EOF = 6,
4181 #[doc = "UnknownCommand: Unknown command / opcode"]
4182 MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
4183 #[doc = "FileExists: File/directory already exists"]
4184 MAV_FTP_ERR_FILEEXISTS = 8,
4185 #[doc = "FileProtected: File/directory is write protected"]
4186 MAV_FTP_ERR_FILEPROTECTED = 9,
4187 #[doc = "FileNotFound: File/directory not found"]
4188 MAV_FTP_ERR_FILENOTFOUND = 10,
4189}
4190impl MavFtpErr {
4191 pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
4192}
4193impl Default for MavFtpErr {
4194 fn default() -> Self {
4195 Self::DEFAULT
4196 }
4197}
4198#[cfg_attr(feature = "ts", derive(TS))]
4199#[cfg_attr(feature = "ts", ts(export))]
4200#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4202#[cfg_attr(feature = "serde", serde(tag = "type"))]
4203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4204#[repr(u32)]
4205#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
4206pub enum MavFtpOpcode {
4207 #[doc = "None. Ignored, always ACKed"]
4208 MAV_FTP_OPCODE_NONE = 0,
4209 #[doc = "TerminateSession: Terminates open Read session"]
4210 MAV_FTP_OPCODE_TERMINATESESSION = 1,
4211 #[doc = "ResetSessions: Terminates all open read sessions"]
4212 MAV_FTP_OPCODE_RESETSESSION = 2,
4213 #[doc = "ListDirectory. List files and directories in path from offset"]
4214 MAV_FTP_OPCODE_LISTDIRECTORY = 3,
4215 #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
4216 MAV_FTP_OPCODE_OPENFILERO = 4,
4217 #[doc = "ReadFile: Reads size bytes from offset in session"]
4218 MAV_FTP_OPCODE_READFILE = 5,
4219 #[doc = "CreateFile: Creates file at path for writing, returns session"]
4220 MAV_FTP_OPCODE_CREATEFILE = 6,
4221 #[doc = "WriteFile: Writes size bytes to offset in session"]
4222 MAV_FTP_OPCODE_WRITEFILE = 7,
4223 #[doc = "RemoveFile: Remove file at path"]
4224 MAV_FTP_OPCODE_REMOVEFILE = 8,
4225 #[doc = "CreateDirectory: Creates directory at path"]
4226 MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
4227 #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
4228 MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
4229 #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
4230 MAV_FTP_OPCODE_OPENFILEWO = 11,
4231 #[doc = "TruncateFile: Truncate file at path to offset length"]
4232 MAV_FTP_OPCODE_TRUNCATEFILE = 12,
4233 #[doc = "Rename: Rename path1 to path2"]
4234 MAV_FTP_OPCODE_RENAME = 13,
4235 #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
4236 MAV_FTP_OPCODE_CALCFILECRC = 14,
4237 #[doc = "BurstReadFile: Burst download session file"]
4238 MAV_FTP_OPCODE_BURSTREADFILE = 15,
4239 #[doc = "ACK: ACK response"]
4240 MAV_FTP_OPCODE_ACK = 128,
4241 #[doc = "NAK: NAK response"]
4242 MAV_FTP_OPCODE_NAK = 129,
4243}
4244impl MavFtpOpcode {
4245 pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
4246}
4247impl Default for MavFtpOpcode {
4248 fn default() -> Self {
4249 Self::DEFAULT
4250 }
4251}
4252#[cfg_attr(feature = "ts", derive(TS))]
4253#[cfg_attr(feature = "ts", ts(export))]
4254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4256#[cfg_attr(feature = "serde", serde(tag = "type"))]
4257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4258#[repr(u32)]
4259#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
4260pub enum MavFuelType {
4261 #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
4262 MAV_FUEL_TYPE_UNKNOWN = 0,
4263 #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
4264 MAV_FUEL_TYPE_LIQUID = 1,
4265 #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
4266 MAV_FUEL_TYPE_GAS = 2,
4267}
4268impl MavFuelType {
4269 pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
4270}
4271impl Default for MavFuelType {
4272 fn default() -> Self {
4273 Self::DEFAULT
4274 }
4275}
4276bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
4277impl MavGeneratorStatusFlag {
4278 pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
4279}
4280impl Default for MavGeneratorStatusFlag {
4281 fn default() -> Self {
4282 Self::DEFAULT
4283 }
4284}
4285#[cfg_attr(feature = "ts", derive(TS))]
4286#[cfg_attr(feature = "ts", ts(export))]
4287#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4289#[cfg_attr(feature = "serde", serde(tag = "type"))]
4290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4291#[repr(u32)]
4292#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
4293pub enum MavGoto {
4294 #[doc = "Hold at the current position."]
4295 MAV_GOTO_DO_HOLD = 0,
4296 #[doc = "Continue with the next item in mission execution."]
4297 MAV_GOTO_DO_CONTINUE = 1,
4298 #[doc = "Hold at the current position of the system"]
4299 MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
4300 #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
4301 MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
4302}
4303impl MavGoto {
4304 pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
4305}
4306impl Default for MavGoto {
4307 fn default() -> Self {
4308 Self::DEFAULT
4309 }
4310}
4311#[cfg_attr(feature = "ts", derive(TS))]
4312#[cfg_attr(feature = "ts", ts(export))]
4313#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4315#[cfg_attr(feature = "serde", serde(tag = "type"))]
4316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4317#[repr(u32)]
4318#[doc = "Enumeration of landed detector states"]
4319pub enum MavLandedState {
4320 #[doc = "MAV landed state is unknown"]
4321 MAV_LANDED_STATE_UNDEFINED = 0,
4322 #[doc = "MAV is landed (on ground)"]
4323 MAV_LANDED_STATE_ON_GROUND = 1,
4324 #[doc = "MAV is in air"]
4325 MAV_LANDED_STATE_IN_AIR = 2,
4326 #[doc = "MAV currently taking off"]
4327 MAV_LANDED_STATE_TAKEOFF = 3,
4328 #[doc = "MAV currently landing"]
4329 MAV_LANDED_STATE_LANDING = 4,
4330}
4331impl MavLandedState {
4332 pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
4333}
4334impl Default for MavLandedState {
4335 fn default() -> Self {
4336 Self::DEFAULT
4337 }
4338}
4339#[cfg_attr(feature = "ts", derive(TS))]
4340#[cfg_attr(feature = "ts", ts(export))]
4341#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4343#[cfg_attr(feature = "serde", serde(tag = "type"))]
4344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4345#[repr(u32)]
4346#[doc = "Result of mission operation (in a MISSION_ACK message)."]
4347pub enum MavMissionResult {
4348 #[doc = "mission accepted OK"]
4349 MAV_MISSION_ACCEPTED = 0,
4350 #[doc = "Generic error / not accepting mission commands at all right now."]
4351 MAV_MISSION_ERROR = 1,
4352 #[doc = "Coordinate frame is not supported."]
4353 MAV_MISSION_UNSUPPORTED_FRAME = 2,
4354 #[doc = "Command is not supported."]
4355 MAV_MISSION_UNSUPPORTED = 3,
4356 #[doc = "Mission items exceed storage space."]
4357 MAV_MISSION_NO_SPACE = 4,
4358 #[doc = "One of the parameters has an invalid value."]
4359 MAV_MISSION_INVALID = 5,
4360 #[doc = "param1 has an invalid value."]
4361 MAV_MISSION_INVALID_PARAM1 = 6,
4362 #[doc = "param2 has an invalid value."]
4363 MAV_MISSION_INVALID_PARAM2 = 7,
4364 #[doc = "param3 has an invalid value."]
4365 MAV_MISSION_INVALID_PARAM3 = 8,
4366 #[doc = "param4 has an invalid value."]
4367 MAV_MISSION_INVALID_PARAM4 = 9,
4368 #[doc = "x / param5 has an invalid value."]
4369 MAV_MISSION_INVALID_PARAM5_X = 10,
4370 #[doc = "y / param6 has an invalid value."]
4371 MAV_MISSION_INVALID_PARAM6_Y = 11,
4372 #[doc = "z / param7 has an invalid value."]
4373 MAV_MISSION_INVALID_PARAM7 = 12,
4374 #[doc = "Mission item received out of sequence"]
4375 MAV_MISSION_INVALID_SEQUENCE = 13,
4376 #[doc = "Not accepting any mission commands from this communication partner."]
4377 MAV_MISSION_DENIED = 14,
4378 #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
4379 MAV_MISSION_OPERATION_CANCELLED = 15,
4380}
4381impl MavMissionResult {
4382 pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
4383}
4384impl Default for MavMissionResult {
4385 fn default() -> Self {
4386 Self::DEFAULT
4387 }
4388}
4389#[cfg_attr(feature = "ts", derive(TS))]
4390#[cfg_attr(feature = "ts", ts(export))]
4391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4393#[cfg_attr(feature = "serde", serde(tag = "type"))]
4394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4395#[repr(u32)]
4396#[doc = "Type of mission items being requested/sent in mission protocol."]
4397pub enum MavMissionType {
4398 #[doc = "Items are mission commands for main mission."]
4399 MAV_MISSION_TYPE_MISSION = 0,
4400 #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
4401 MAV_MISSION_TYPE_FENCE = 1,
4402 #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
4403 MAV_MISSION_TYPE_RALLY = 2,
4404 #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
4405 MAV_MISSION_TYPE_ALL = 255,
4406}
4407impl MavMissionType {
4408 pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
4409}
4410impl Default for MavMissionType {
4411 fn default() -> Self {
4412 Self::DEFAULT
4413 }
4414}
4415#[cfg_attr(feature = "ts", derive(TS))]
4416#[cfg_attr(feature = "ts", ts(export))]
4417#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4419#[cfg_attr(feature = "serde", serde(tag = "type"))]
4420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4421#[repr(u32)]
4422#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
4423pub enum MavMode {
4424 #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
4425 MAV_MODE_PREFLIGHT = 0,
4426 #[doc = "System is allowed to be active, under assisted RC control."]
4427 MAV_MODE_STABILIZE_DISARMED = 80,
4428 #[doc = "System is allowed to be active, under assisted RC control."]
4429 MAV_MODE_STABILIZE_ARMED = 208,
4430 #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
4431 MAV_MODE_MANUAL_DISARMED = 64,
4432 #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
4433 MAV_MODE_MANUAL_ARMED = 192,
4434 #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
4435 MAV_MODE_GUIDED_DISARMED = 88,
4436 #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
4437 MAV_MODE_GUIDED_ARMED = 216,
4438 #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
4439 MAV_MODE_AUTO_DISARMED = 92,
4440 #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
4441 MAV_MODE_AUTO_ARMED = 220,
4442 #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
4443 MAV_MODE_TEST_DISARMED = 66,
4444 #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
4445 MAV_MODE_TEST_ARMED = 194,
4446}
4447impl MavMode {
4448 pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
4449}
4450impl Default for MavMode {
4451 fn default() -> Self {
4452 Self::DEFAULT
4453 }
4454}
4455bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
4456impl MavModeFlag {
4457 pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
4458}
4459impl Default for MavModeFlag {
4460 fn default() -> Self {
4461 Self::DEFAULT
4462 }
4463}
4464#[cfg_attr(feature = "ts", derive(TS))]
4465#[cfg_attr(feature = "ts", ts(export))]
4466#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4468#[cfg_attr(feature = "serde", serde(tag = "type"))]
4469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4470#[repr(u32)]
4471#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
4472pub enum MavModeFlagDecodePosition {
4473 #[doc = "First bit: 10000000"]
4474 MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
4475 #[doc = "Second bit: 01000000"]
4476 MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
4477 #[doc = "Third bit: 00100000"]
4478 MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
4479 #[doc = "Fourth bit: 00010000"]
4480 MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
4481 #[doc = "Fifth bit: 00001000"]
4482 MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
4483 #[doc = "Sixth bit: 00000100"]
4484 MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
4485 #[doc = "Seventh bit: 00000010"]
4486 MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
4487 #[doc = "Eighth bit: 00000001"]
4488 MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
4489}
4490impl MavModeFlagDecodePosition {
4491 pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
4492}
4493impl Default for MavModeFlagDecodePosition {
4494 fn default() -> Self {
4495 Self::DEFAULT
4496 }
4497}
4498bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode. For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not. A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes. The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller). If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
4499impl MavModeProperty {
4500 pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
4501}
4502impl Default for MavModeProperty {
4503 fn default() -> Self {
4504 Self::DEFAULT
4505 }
4506}
4507#[cfg_attr(feature = "ts", derive(TS))]
4508#[cfg_attr(feature = "ts", ts(export))]
4509#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4511#[cfg_attr(feature = "serde", serde(tag = "type"))]
4512#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4513#[repr(u32)]
4514#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
4515#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
4516pub enum MavMountMode {
4517 #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
4518 MAV_MOUNT_MODE_RETRACT = 0,
4519 #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
4520 MAV_MOUNT_MODE_NEUTRAL = 1,
4521 #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
4522 MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
4523 #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
4524 MAV_MOUNT_MODE_RC_TARGETING = 3,
4525 #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
4526 MAV_MOUNT_MODE_GPS_POINT = 4,
4527 #[doc = "Gimbal tracks system with specified system ID"]
4528 MAV_MOUNT_MODE_SYSID_TARGET = 5,
4529 #[doc = "Gimbal tracks home position"]
4530 MAV_MOUNT_MODE_HOME_LOCATION = 6,
4531}
4532impl MavMountMode {
4533 pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
4534}
4535impl Default for MavMountMode {
4536 fn default() -> Self {
4537 Self::DEFAULT
4538 }
4539}
4540#[cfg_attr(feature = "ts", derive(TS))]
4541#[cfg_attr(feature = "ts", ts(export))]
4542#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4544#[cfg_attr(feature = "serde", serde(tag = "type"))]
4545#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4546#[repr(u32)]
4547pub enum MavOdidArmStatus {
4548 #[doc = "Passing arming checks."]
4549 MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
4550 #[doc = "Generic arming failure, see error string for details."]
4551 MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
4552}
4553impl MavOdidArmStatus {
4554 pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
4555}
4556impl Default for MavOdidArmStatus {
4557 fn default() -> Self {
4558 Self::DEFAULT
4559 }
4560}
4561#[cfg_attr(feature = "ts", derive(TS))]
4562#[cfg_attr(feature = "ts", ts(export))]
4563#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4565#[cfg_attr(feature = "serde", serde(tag = "type"))]
4566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4567#[repr(u32)]
4568pub enum MavOdidAuthType {
4569 #[doc = "No authentication type is specified."]
4570 MAV_ODID_AUTH_TYPE_NONE = 0,
4571 #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
4572 MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
4573 #[doc = "Signature for the Operator ID."]
4574 MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
4575 #[doc = "Signature for the entire message set."]
4576 MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
4577 #[doc = "Authentication is provided by Network Remote ID."]
4578 MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
4579 #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
4580 MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
4581}
4582impl MavOdidAuthType {
4583 pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
4584}
4585impl Default for MavOdidAuthType {
4586 fn default() -> Self {
4587 Self::DEFAULT
4588 }
4589}
4590#[cfg_attr(feature = "ts", derive(TS))]
4591#[cfg_attr(feature = "ts", ts(export))]
4592#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4594#[cfg_attr(feature = "serde", serde(tag = "type"))]
4595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4596#[repr(u32)]
4597pub enum MavOdidCategoryEu {
4598 #[doc = "The category for the UA, according to the EU specification, is undeclared."]
4599 MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
4600 #[doc = "The category for the UA, according to the EU specification, is the Open category."]
4601 MAV_ODID_CATEGORY_EU_OPEN = 1,
4602 #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
4603 MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
4604 #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
4605 MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
4606}
4607impl MavOdidCategoryEu {
4608 pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
4609}
4610impl Default for MavOdidCategoryEu {
4611 fn default() -> Self {
4612 Self::DEFAULT
4613 }
4614}
4615#[cfg_attr(feature = "ts", derive(TS))]
4616#[cfg_attr(feature = "ts", ts(export))]
4617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4619#[cfg_attr(feature = "serde", serde(tag = "type"))]
4620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4621#[repr(u32)]
4622pub enum MavOdidClassEu {
4623 #[doc = "The class for the UA, according to the EU specification, is undeclared."]
4624 MAV_ODID_CLASS_EU_UNDECLARED = 0,
4625 #[doc = "The class for the UA, according to the EU specification, is Class 0."]
4626 MAV_ODID_CLASS_EU_CLASS_0 = 1,
4627 #[doc = "The class for the UA, according to the EU specification, is Class 1."]
4628 MAV_ODID_CLASS_EU_CLASS_1 = 2,
4629 #[doc = "The class for the UA, according to the EU specification, is Class 2."]
4630 MAV_ODID_CLASS_EU_CLASS_2 = 3,
4631 #[doc = "The class for the UA, according to the EU specification, is Class 3."]
4632 MAV_ODID_CLASS_EU_CLASS_3 = 4,
4633 #[doc = "The class for the UA, according to the EU specification, is Class 4."]
4634 MAV_ODID_CLASS_EU_CLASS_4 = 5,
4635 #[doc = "The class for the UA, according to the EU specification, is Class 5."]
4636 MAV_ODID_CLASS_EU_CLASS_5 = 6,
4637 #[doc = "The class for the UA, according to the EU specification, is Class 6."]
4638 MAV_ODID_CLASS_EU_CLASS_6 = 7,
4639}
4640impl MavOdidClassEu {
4641 pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
4642}
4643impl Default for MavOdidClassEu {
4644 fn default() -> Self {
4645 Self::DEFAULT
4646 }
4647}
4648#[cfg_attr(feature = "ts", derive(TS))]
4649#[cfg_attr(feature = "ts", ts(export))]
4650#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4652#[cfg_attr(feature = "serde", serde(tag = "type"))]
4653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4654#[repr(u32)]
4655pub enum MavOdidClassificationType {
4656 #[doc = "The classification type for the UA is undeclared."]
4657 MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
4658 #[doc = "The classification type for the UA follows EU (European Union) specifications."]
4659 MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
4660}
4661impl MavOdidClassificationType {
4662 pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
4663}
4664impl Default for MavOdidClassificationType {
4665 fn default() -> Self {
4666 Self::DEFAULT
4667 }
4668}
4669#[cfg_attr(feature = "ts", derive(TS))]
4670#[cfg_attr(feature = "ts", ts(export))]
4671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4673#[cfg_attr(feature = "serde", serde(tag = "type"))]
4674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4675#[repr(u32)]
4676pub enum MavOdidDescType {
4677 #[doc = "Optional free-form text description of the purpose of the flight."]
4678 MAV_ODID_DESC_TYPE_TEXT = 0,
4679 #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
4680 MAV_ODID_DESC_TYPE_EMERGENCY = 1,
4681 #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
4682 MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
4683}
4684impl MavOdidDescType {
4685 pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
4686}
4687impl Default for MavOdidDescType {
4688 fn default() -> Self {
4689 Self::DEFAULT
4690 }
4691}
4692#[cfg_attr(feature = "ts", derive(TS))]
4693#[cfg_attr(feature = "ts", ts(export))]
4694#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4696#[cfg_attr(feature = "serde", serde(tag = "type"))]
4697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4698#[repr(u32)]
4699pub enum MavOdidHeightRef {
4700 #[doc = "The height field is relative to the take-off location."]
4701 MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
4702 #[doc = "The height field is relative to ground."]
4703 MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
4704}
4705impl MavOdidHeightRef {
4706 pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
4707}
4708impl Default for MavOdidHeightRef {
4709 fn default() -> Self {
4710 Self::DEFAULT
4711 }
4712}
4713#[cfg_attr(feature = "ts", derive(TS))]
4714#[cfg_attr(feature = "ts", ts(export))]
4715#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4717#[cfg_attr(feature = "serde", serde(tag = "type"))]
4718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4719#[repr(u32)]
4720pub enum MavOdidHorAcc {
4721 #[doc = "The horizontal accuracy is unknown."]
4722 MAV_ODID_HOR_ACC_UNKNOWN = 0,
4723 #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
4724 MAV_ODID_HOR_ACC_10NM = 1,
4725 #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
4726 MAV_ODID_HOR_ACC_4NM = 2,
4727 #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
4728 MAV_ODID_HOR_ACC_2NM = 3,
4729 #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
4730 MAV_ODID_HOR_ACC_1NM = 4,
4731 #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
4732 MAV_ODID_HOR_ACC_0_5NM = 5,
4733 #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
4734 MAV_ODID_HOR_ACC_0_3NM = 6,
4735 #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
4736 MAV_ODID_HOR_ACC_0_1NM = 7,
4737 #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
4738 MAV_ODID_HOR_ACC_0_05NM = 8,
4739 #[doc = "The horizontal accuracy is smaller than 30 meter."]
4740 MAV_ODID_HOR_ACC_30_METER = 9,
4741 #[doc = "The horizontal accuracy is smaller than 10 meter."]
4742 MAV_ODID_HOR_ACC_10_METER = 10,
4743 #[doc = "The horizontal accuracy is smaller than 3 meter."]
4744 MAV_ODID_HOR_ACC_3_METER = 11,
4745 #[doc = "The horizontal accuracy is smaller than 1 meter."]
4746 MAV_ODID_HOR_ACC_1_METER = 12,
4747}
4748impl MavOdidHorAcc {
4749 pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
4750}
4751impl Default for MavOdidHorAcc {
4752 fn default() -> Self {
4753 Self::DEFAULT
4754 }
4755}
4756#[cfg_attr(feature = "ts", derive(TS))]
4757#[cfg_attr(feature = "ts", ts(export))]
4758#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4760#[cfg_attr(feature = "serde", serde(tag = "type"))]
4761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4762#[repr(u32)]
4763pub enum MavOdidIdType {
4764 #[doc = "No type defined."]
4765 MAV_ODID_ID_TYPE_NONE = 0,
4766 #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
4767 MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
4768 #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
4769 MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
4770 #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
4771 MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
4772 #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
4773 MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
4774}
4775impl MavOdidIdType {
4776 pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
4777}
4778impl Default for MavOdidIdType {
4779 fn default() -> Self {
4780 Self::DEFAULT
4781 }
4782}
4783#[cfg_attr(feature = "ts", derive(TS))]
4784#[cfg_attr(feature = "ts", ts(export))]
4785#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4787#[cfg_attr(feature = "serde", serde(tag = "type"))]
4788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4789#[repr(u32)]
4790pub enum MavOdidOperatorIdType {
4791 #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
4792 MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
4793}
4794impl MavOdidOperatorIdType {
4795 pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
4796}
4797impl Default for MavOdidOperatorIdType {
4798 fn default() -> Self {
4799 Self::DEFAULT
4800 }
4801}
4802#[cfg_attr(feature = "ts", derive(TS))]
4803#[cfg_attr(feature = "ts", ts(export))]
4804#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4806#[cfg_attr(feature = "serde", serde(tag = "type"))]
4807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4808#[repr(u32)]
4809pub enum MavOdidOperatorLocationType {
4810 #[doc = "The location/altitude of the operator is the same as the take-off location."]
4811 MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
4812 #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
4813 MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
4814 #[doc = "The location/altitude of the operator are fixed values."]
4815 MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
4816}
4817impl MavOdidOperatorLocationType {
4818 pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
4819}
4820impl Default for MavOdidOperatorLocationType {
4821 fn default() -> Self {
4822 Self::DEFAULT
4823 }
4824}
4825#[cfg_attr(feature = "ts", derive(TS))]
4826#[cfg_attr(feature = "ts", ts(export))]
4827#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4829#[cfg_attr(feature = "serde", serde(tag = "type"))]
4830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4831#[repr(u32)]
4832pub enum MavOdidSpeedAcc {
4833 #[doc = "The speed accuracy is unknown."]
4834 MAV_ODID_SPEED_ACC_UNKNOWN = 0,
4835 #[doc = "The speed accuracy is smaller than 10 meters per second."]
4836 MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
4837 #[doc = "The speed accuracy is smaller than 3 meters per second."]
4838 MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
4839 #[doc = "The speed accuracy is smaller than 1 meters per second."]
4840 MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
4841 #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
4842 MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
4843}
4844impl MavOdidSpeedAcc {
4845 pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
4846}
4847impl Default for MavOdidSpeedAcc {
4848 fn default() -> Self {
4849 Self::DEFAULT
4850 }
4851}
4852#[cfg_attr(feature = "ts", derive(TS))]
4853#[cfg_attr(feature = "ts", ts(export))]
4854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4856#[cfg_attr(feature = "serde", serde(tag = "type"))]
4857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4858#[repr(u32)]
4859pub enum MavOdidStatus {
4860 #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
4861 MAV_ODID_STATUS_UNDECLARED = 0,
4862 #[doc = "The UA is on the ground."]
4863 MAV_ODID_STATUS_GROUND = 1,
4864 #[doc = "The UA is in the air."]
4865 MAV_ODID_STATUS_AIRBORNE = 2,
4866 #[doc = "The UA is having an emergency."]
4867 MAV_ODID_STATUS_EMERGENCY = 3,
4868 #[doc = "The remote ID system is failing or unreliable in some way."]
4869 MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
4870}
4871impl MavOdidStatus {
4872 pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
4873}
4874impl Default for MavOdidStatus {
4875 fn default() -> Self {
4876 Self::DEFAULT
4877 }
4878}
4879#[cfg_attr(feature = "ts", derive(TS))]
4880#[cfg_attr(feature = "ts", ts(export))]
4881#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4883#[cfg_attr(feature = "serde", serde(tag = "type"))]
4884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4885#[repr(u32)]
4886pub enum MavOdidTimeAcc {
4887 #[doc = "The timestamp accuracy is unknown."]
4888 MAV_ODID_TIME_ACC_UNKNOWN = 0,
4889 #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
4890 MAV_ODID_TIME_ACC_0_1_SECOND = 1,
4891 #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
4892 MAV_ODID_TIME_ACC_0_2_SECOND = 2,
4893 #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
4894 MAV_ODID_TIME_ACC_0_3_SECOND = 3,
4895 #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
4896 MAV_ODID_TIME_ACC_0_4_SECOND = 4,
4897 #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
4898 MAV_ODID_TIME_ACC_0_5_SECOND = 5,
4899 #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
4900 MAV_ODID_TIME_ACC_0_6_SECOND = 6,
4901 #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
4902 MAV_ODID_TIME_ACC_0_7_SECOND = 7,
4903 #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
4904 MAV_ODID_TIME_ACC_0_8_SECOND = 8,
4905 #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
4906 MAV_ODID_TIME_ACC_0_9_SECOND = 9,
4907 #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
4908 MAV_ODID_TIME_ACC_1_0_SECOND = 10,
4909 #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
4910 MAV_ODID_TIME_ACC_1_1_SECOND = 11,
4911 #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
4912 MAV_ODID_TIME_ACC_1_2_SECOND = 12,
4913 #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
4914 MAV_ODID_TIME_ACC_1_3_SECOND = 13,
4915 #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
4916 MAV_ODID_TIME_ACC_1_4_SECOND = 14,
4917 #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
4918 MAV_ODID_TIME_ACC_1_5_SECOND = 15,
4919}
4920impl MavOdidTimeAcc {
4921 pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
4922}
4923impl Default for MavOdidTimeAcc {
4924 fn default() -> Self {
4925 Self::DEFAULT
4926 }
4927}
4928#[cfg_attr(feature = "ts", derive(TS))]
4929#[cfg_attr(feature = "ts", ts(export))]
4930#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4932#[cfg_attr(feature = "serde", serde(tag = "type"))]
4933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4934#[repr(u32)]
4935pub enum MavOdidUaType {
4936 #[doc = "No UA (Unmanned Aircraft) type defined."]
4937 MAV_ODID_UA_TYPE_NONE = 0,
4938 #[doc = "Aeroplane/Airplane. Fixed wing."]
4939 MAV_ODID_UA_TYPE_AEROPLANE = 1,
4940 #[doc = "Helicopter or multirotor."]
4941 MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
4942 #[doc = "Gyroplane."]
4943 MAV_ODID_UA_TYPE_GYROPLANE = 3,
4944 #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
4945 MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
4946 #[doc = "Ornithopter."]
4947 MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
4948 #[doc = "Glider."]
4949 MAV_ODID_UA_TYPE_GLIDER = 6,
4950 #[doc = "Kite."]
4951 MAV_ODID_UA_TYPE_KITE = 7,
4952 #[doc = "Free Balloon."]
4953 MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
4954 #[doc = "Captive Balloon."]
4955 MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
4956 #[doc = "Airship. E.g. a blimp."]
4957 MAV_ODID_UA_TYPE_AIRSHIP = 10,
4958 #[doc = "Free Fall/Parachute (unpowered)."]
4959 MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
4960 #[doc = "Rocket."]
4961 MAV_ODID_UA_TYPE_ROCKET = 12,
4962 #[doc = "Tethered powered aircraft."]
4963 MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
4964 #[doc = "Ground Obstacle."]
4965 MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
4966 #[doc = "Other type of aircraft not listed earlier."]
4967 MAV_ODID_UA_TYPE_OTHER = 15,
4968}
4969impl MavOdidUaType {
4970 pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
4971}
4972impl Default for MavOdidUaType {
4973 fn default() -> Self {
4974 Self::DEFAULT
4975 }
4976}
4977#[cfg_attr(feature = "ts", derive(TS))]
4978#[cfg_attr(feature = "ts", ts(export))]
4979#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4981#[cfg_attr(feature = "serde", serde(tag = "type"))]
4982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4983#[repr(u32)]
4984pub enum MavOdidVerAcc {
4985 #[doc = "The vertical accuracy is unknown."]
4986 MAV_ODID_VER_ACC_UNKNOWN = 0,
4987 #[doc = "The vertical accuracy is smaller than 150 meter."]
4988 MAV_ODID_VER_ACC_150_METER = 1,
4989 #[doc = "The vertical accuracy is smaller than 45 meter."]
4990 MAV_ODID_VER_ACC_45_METER = 2,
4991 #[doc = "The vertical accuracy is smaller than 25 meter."]
4992 MAV_ODID_VER_ACC_25_METER = 3,
4993 #[doc = "The vertical accuracy is smaller than 10 meter."]
4994 MAV_ODID_VER_ACC_10_METER = 4,
4995 #[doc = "The vertical accuracy is smaller than 3 meter."]
4996 MAV_ODID_VER_ACC_3_METER = 5,
4997 #[doc = "The vertical accuracy is smaller than 1 meter."]
4998 MAV_ODID_VER_ACC_1_METER = 6,
4999}
5000impl MavOdidVerAcc {
5001 pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
5002}
5003impl Default for MavOdidVerAcc {
5004 fn default() -> Self {
5005 Self::DEFAULT
5006 }
5007}
5008#[cfg_attr(feature = "ts", derive(TS))]
5009#[cfg_attr(feature = "ts", ts(export))]
5010#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5012#[cfg_attr(feature = "serde", serde(tag = "type"))]
5013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5014#[repr(u32)]
5015#[doc = "Specifies the datatype of a MAVLink extended parameter."]
5016pub enum MavParamExtType {
5017 #[doc = "8-bit unsigned integer"]
5018 MAV_PARAM_EXT_TYPE_UINT8 = 1,
5019 #[doc = "8-bit signed integer"]
5020 MAV_PARAM_EXT_TYPE_INT8 = 2,
5021 #[doc = "16-bit unsigned integer"]
5022 MAV_PARAM_EXT_TYPE_UINT16 = 3,
5023 #[doc = "16-bit signed integer"]
5024 MAV_PARAM_EXT_TYPE_INT16 = 4,
5025 #[doc = "32-bit unsigned integer"]
5026 MAV_PARAM_EXT_TYPE_UINT32 = 5,
5027 #[doc = "32-bit signed integer"]
5028 MAV_PARAM_EXT_TYPE_INT32 = 6,
5029 #[doc = "64-bit unsigned integer"]
5030 MAV_PARAM_EXT_TYPE_UINT64 = 7,
5031 #[doc = "64-bit signed integer"]
5032 MAV_PARAM_EXT_TYPE_INT64 = 8,
5033 #[doc = "32-bit floating-point"]
5034 MAV_PARAM_EXT_TYPE_REAL32 = 9,
5035 #[doc = "64-bit floating-point"]
5036 MAV_PARAM_EXT_TYPE_REAL64 = 10,
5037 #[doc = "Custom Type"]
5038 MAV_PARAM_EXT_TYPE_CUSTOM = 11,
5039}
5040impl MavParamExtType {
5041 pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
5042}
5043impl Default for MavParamExtType {
5044 fn default() -> Self {
5045 Self::DEFAULT
5046 }
5047}
5048#[cfg_attr(feature = "ts", derive(TS))]
5049#[cfg_attr(feature = "ts", ts(export))]
5050#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5052#[cfg_attr(feature = "serde", serde(tag = "type"))]
5053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5054#[repr(u32)]
5055#[doc = "Specifies the datatype of a MAVLink parameter."]
5056pub enum MavParamType {
5057 #[doc = "8-bit unsigned integer"]
5058 MAV_PARAM_TYPE_UINT8 = 1,
5059 #[doc = "8-bit signed integer"]
5060 MAV_PARAM_TYPE_INT8 = 2,
5061 #[doc = "16-bit unsigned integer"]
5062 MAV_PARAM_TYPE_UINT16 = 3,
5063 #[doc = "16-bit signed integer"]
5064 MAV_PARAM_TYPE_INT16 = 4,
5065 #[doc = "32-bit unsigned integer"]
5066 MAV_PARAM_TYPE_UINT32 = 5,
5067 #[doc = "32-bit signed integer"]
5068 MAV_PARAM_TYPE_INT32 = 6,
5069 #[doc = "64-bit unsigned integer"]
5070 MAV_PARAM_TYPE_UINT64 = 7,
5071 #[doc = "64-bit signed integer"]
5072 MAV_PARAM_TYPE_INT64 = 8,
5073 #[doc = "32-bit floating-point"]
5074 MAV_PARAM_TYPE_REAL32 = 9,
5075 #[doc = "64-bit floating-point"]
5076 MAV_PARAM_TYPE_REAL64 = 10,
5077}
5078impl MavParamType {
5079 pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
5080}
5081impl Default for MavParamType {
5082 fn default() -> Self {
5083 Self::DEFAULT
5084 }
5085}
5086bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
5087impl MavPowerStatus {
5088 pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
5089}
5090impl Default for MavPowerStatus {
5091 fn default() -> Self {
5092 Self::DEFAULT
5093 }
5094}
5095bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type. Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type. Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>. Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>. Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
5096impl MavProtocolCapability {
5097 pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
5098}
5099impl Default for MavProtocolCapability {
5100 fn default() -> Self {
5101 Self::DEFAULT
5102 }
5103}
5104#[cfg_attr(feature = "ts", derive(TS))]
5105#[cfg_attr(feature = "ts", ts(export))]
5106#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5108#[cfg_attr(feature = "serde", serde(tag = "type"))]
5109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5110#[repr(u32)]
5111#[doc = "Result from a MAVLink command (MAV_CMD)"]
5112pub enum MavResult {
5113 #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
5114 MAV_RESULT_ACCEPTED = 0,
5115 #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
5116 MAV_RESULT_TEMPORARILY_REJECTED = 1,
5117 #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
5118 MAV_RESULT_DENIED = 2,
5119 #[doc = "Command is not supported (unknown)."]
5120 MAV_RESULT_UNSUPPORTED = 3,
5121 #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
5122 MAV_RESULT_FAILED = 4,
5123 #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
5124 MAV_RESULT_IN_PROGRESS = 5,
5125 #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
5126 MAV_RESULT_CANCELLED = 6,
5127 #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
5128 MAV_RESULT_COMMAND_LONG_ONLY = 7,
5129 #[doc = "Command is only accepted when sent as a COMMAND_INT."]
5130 MAV_RESULT_COMMAND_INT_ONLY = 8,
5131 #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
5132 MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
5133}
5134impl MavResult {
5135 pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
5136}
5137impl Default for MavResult {
5138 fn default() -> Self {
5139 Self::DEFAULT
5140 }
5141}
5142#[cfg_attr(feature = "ts", derive(TS))]
5143#[cfg_attr(feature = "ts", ts(export))]
5144#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5146#[cfg_attr(feature = "serde", serde(tag = "type"))]
5147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5148#[repr(u32)]
5149#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
5150#[doc = "The ROI (region of interest) for the vehicle. This can be be used by the vehicle for camera/vehicle attitude alignment (see MAV_CMD_NAV_ROI)."]
5151pub enum MavRoi {
5152 #[doc = "No region of interest."]
5153 MAV_ROI_NONE = 0,
5154 #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
5155 MAV_ROI_WPNEXT = 1,
5156 #[doc = "Point toward given waypoint."]
5157 MAV_ROI_WPINDEX = 2,
5158 #[doc = "Point toward fixed location."]
5159 MAV_ROI_LOCATION = 3,
5160 #[doc = "Point toward of given id."]
5161 MAV_ROI_TARGET = 4,
5162}
5163impl MavRoi {
5164 pub const DEFAULT: Self = Self::MAV_ROI_NONE;
5165}
5166impl Default for MavRoi {
5167 fn default() -> Self {
5168 Self::DEFAULT
5169 }
5170}
5171#[cfg_attr(feature = "ts", derive(TS))]
5172#[cfg_attr(feature = "ts", ts(export))]
5173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5175#[cfg_attr(feature = "serde", serde(tag = "type"))]
5176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5177#[repr(u32)]
5178#[doc = "Enumeration of sensor orientation, according to its rotations"]
5179pub enum MavSensorOrientation {
5180 #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
5181 MAV_SENSOR_ROTATION_NONE = 0,
5182 #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
5183 MAV_SENSOR_ROTATION_YAW_45 = 1,
5184 #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
5185 MAV_SENSOR_ROTATION_YAW_90 = 2,
5186 #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
5187 MAV_SENSOR_ROTATION_YAW_135 = 3,
5188 #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
5189 MAV_SENSOR_ROTATION_YAW_180 = 4,
5190 #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
5191 MAV_SENSOR_ROTATION_YAW_225 = 5,
5192 #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
5193 MAV_SENSOR_ROTATION_YAW_270 = 6,
5194 #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
5195 MAV_SENSOR_ROTATION_YAW_315 = 7,
5196 #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
5197 MAV_SENSOR_ROTATION_ROLL_180 = 8,
5198 #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
5199 MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
5200 #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
5201 MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
5202 #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
5203 MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
5204 #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
5205 MAV_SENSOR_ROTATION_PITCH_180 = 12,
5206 #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
5207 MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
5208 #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
5209 MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
5210 #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
5211 MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
5212 #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
5213 MAV_SENSOR_ROTATION_ROLL_90 = 16,
5214 #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
5215 MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
5216 #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
5217 MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
5218 #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
5219 MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
5220 #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
5221 MAV_SENSOR_ROTATION_ROLL_270 = 20,
5222 #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
5223 MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
5224 #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
5225 MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
5226 #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
5227 MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
5228 #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
5229 MAV_SENSOR_ROTATION_PITCH_90 = 24,
5230 #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
5231 MAV_SENSOR_ROTATION_PITCH_270 = 25,
5232 #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
5233 MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
5234 #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
5235 MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
5236 #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
5237 MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
5238 #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
5239 MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
5240 #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
5241 MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
5242 #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
5243 MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
5244 #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
5245 MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
5246 #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
5247 MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
5248 #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
5249 MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
5250 #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
5251 MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
5252 #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
5253 MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
5254 #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
5255 MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
5256 #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
5257 MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
5258 #[doc = "Pitch: 315"]
5259 MAV_SENSOR_ROTATION_PITCH_315 = 39,
5260 #[doc = "Roll: 90, Pitch: 315"]
5261 MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
5262 #[doc = "Custom orientation"]
5263 MAV_SENSOR_ROTATION_CUSTOM = 100,
5264}
5265impl MavSensorOrientation {
5266 pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
5267}
5268impl Default for MavSensorOrientation {
5269 fn default() -> Self {
5270 Self::DEFAULT
5271 }
5272}
5273#[cfg_attr(feature = "ts", derive(TS))]
5274#[cfg_attr(feature = "ts", ts(export))]
5275#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5277#[cfg_attr(feature = "serde", serde(tag = "type"))]
5278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5279#[repr(u32)]
5280#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
5281pub enum MavSeverity {
5282 #[doc = "System is unusable. This is a \"panic\" condition."]
5283 MAV_SEVERITY_EMERGENCY = 0,
5284 #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
5285 MAV_SEVERITY_ALERT = 1,
5286 #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
5287 MAV_SEVERITY_CRITICAL = 2,
5288 #[doc = "Indicates an error in secondary/redundant systems."]
5289 MAV_SEVERITY_ERROR = 3,
5290 #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
5291 MAV_SEVERITY_WARNING = 4,
5292 #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
5293 MAV_SEVERITY_NOTICE = 5,
5294 #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
5295 MAV_SEVERITY_INFO = 6,
5296 #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
5297 MAV_SEVERITY_DEBUG = 7,
5298}
5299impl MavSeverity {
5300 pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
5301}
5302impl Default for MavSeverity {
5303 fn default() -> Self {
5304 Self::DEFAULT
5305 }
5306}
5307#[cfg_attr(feature = "ts", derive(TS))]
5308#[cfg_attr(feature = "ts", ts(export))]
5309#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5311#[cfg_attr(feature = "serde", serde(tag = "type"))]
5312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5313#[repr(u32)]
5314#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types. For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ. The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE. The current mode is streamed in CURRENT_MODE. See <https://mavlink.io/en/services/standard_modes.html>"]
5315pub enum MavStandardMode {
5316 #[doc = "Non standard mode. This may be used when reporting the mode if the current flight mode is not a standard mode."]
5317 MAV_STANDARD_MODE_NON_STANDARD = 0,
5318 #[doc = "Position mode (manual). Position-controlled and stabilized manual mode. When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces. This mode can only be set by vehicles that can hold a fixed position. Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces. Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles. Fixed-wing (FW) vehicles must not support this mode. Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5319 MAV_STANDARD_MODE_POSITION_HOLD = 1,
5320 #[doc = "Orbit (manual). Position-controlled and stabilized manual mode. The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction. Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated. Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters. MC and FW vehicles may support this mode. Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration. Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5321 MAV_STANDARD_MODE_ORBIT = 2,
5322 #[doc = "Cruise mode (manual). Position-controlled and stabilized manual mode. When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces. Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces. Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles. Multicopter (MC) vehicles must not support this mode. Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5323 MAV_STANDARD_MODE_CRUISE = 3,
5324 #[doc = "Altitude hold (manual). Altitude-controlled and stabilized manual mode. When sticks are released vehicles return to their level-flight orientation and hold their altitude. MC vehicles continue with existing momentum and may move with wind (or other external forces). FW vehicles continue with current heading, but may be moved off-track by wind. Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC). Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5325 MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
5326 #[doc = "Safe recovery mode (auto). Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle. This mode is more commonly referred to as RTL and/or or Smart RTL. The precise return location, flight path, and landing behaviour depend on vehicle configuration and type. For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
5327 MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
5328 #[doc = "Mission mode (automatic). Automatic mode that executes MAVLink missions. Missions are executed from the current waypoint as soon as the mode is enabled."]
5329 MAV_STANDARD_MODE_MISSION = 6,
5330 #[doc = "Land mode (auto). Automatic mode that lands the vehicle at the current location. The precise landing behaviour depends on vehicle configuration and type."]
5331 MAV_STANDARD_MODE_LAND = 7,
5332 #[doc = "Takeoff mode (auto). Automatic takeoff mode. The precise takeoff behaviour depends on vehicle configuration and type."]
5333 MAV_STANDARD_MODE_TAKEOFF = 8,
5334}
5335impl MavStandardMode {
5336 pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
5337}
5338impl Default for MavStandardMode {
5339 fn default() -> Self {
5340 Self::DEFAULT
5341 }
5342}
5343#[cfg_attr(feature = "ts", derive(TS))]
5344#[cfg_attr(feature = "ts", ts(export))]
5345#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5347#[cfg_attr(feature = "serde", serde(tag = "type"))]
5348#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5349#[repr(u32)]
5350pub enum MavState {
5351 #[doc = "Uninitialized system, state is unknown."]
5352 MAV_STATE_UNINIT = 0,
5353 #[doc = "System is booting up."]
5354 MAV_STATE_BOOT = 1,
5355 #[doc = "System is calibrating and not flight-ready."]
5356 MAV_STATE_CALIBRATING = 2,
5357 #[doc = "System is grounded and on standby. It can be launched any time."]
5358 MAV_STATE_STANDBY = 3,
5359 #[doc = "System is active and might be already airborne. Motors are engaged."]
5360 MAV_STATE_ACTIVE = 4,
5361 #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
5362 MAV_STATE_CRITICAL = 5,
5363 #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
5364 MAV_STATE_EMERGENCY = 6,
5365 #[doc = "System just initialized its power-down sequence, will shut down now."]
5366 MAV_STATE_POWEROFF = 7,
5367 #[doc = "System is terminating itself (failsafe or commanded)."]
5368 MAV_STATE_FLIGHT_TERMINATION = 8,
5369}
5370impl MavState {
5371 pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
5372}
5373impl Default for MavState {
5374 fn default() -> Self {
5375 Self::DEFAULT
5376 }
5377}
5378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
5379impl MavSysStatusSensor {
5380 pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
5381}
5382impl Default for MavSysStatusSensor {
5383 fn default() -> Self {
5384 Self::DEFAULT
5385 }
5386}
5387bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
5388impl MavSysStatusSensorExtended {
5389 pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
5390}
5391impl Default for MavSysStatusSensorExtended {
5392 fn default() -> Self {
5393 Self::DEFAULT
5394 }
5395}
5396#[cfg_attr(feature = "ts", derive(TS))]
5397#[cfg_attr(feature = "ts", ts(export))]
5398#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5400#[cfg_attr(feature = "serde", serde(tag = "type"))]
5401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5402#[repr(u32)]
5403pub enum MavTunnelPayloadType {
5404 #[doc = "Encoding of payload unknown."]
5405 MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
5406 #[doc = "Registered for STorM32 gimbal controller."]
5407 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
5408 #[doc = "Registered for STorM32 gimbal controller."]
5409 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
5410 #[doc = "Registered for STorM32 gimbal controller."]
5411 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
5412 #[doc = "Registered for STorM32 gimbal controller."]
5413 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
5414 #[doc = "Registered for STorM32 gimbal controller."]
5415 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
5416 #[doc = "Registered for STorM32 gimbal controller."]
5417 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
5418 #[doc = "Registered for STorM32 gimbal controller."]
5419 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
5420 #[doc = "Registered for STorM32 gimbal controller."]
5421 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
5422 #[doc = "Registered for STorM32 gimbal controller."]
5423 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
5424 #[doc = "Registered for STorM32 gimbal controller."]
5425 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
5426 #[doc = "Registered for ModalAI remote OSD protocol."]
5427 MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
5428 #[doc = "Registered for ModalAI ESC UART passthru protocol."]
5429 MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
5430 #[doc = "Registered for ModalAI vendor use."]
5431 MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
5432}
5433impl MavTunnelPayloadType {
5434 pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
5435}
5436impl Default for MavTunnelPayloadType {
5437 fn default() -> Self {
5438 Self::DEFAULT
5439 }
5440}
5441#[cfg_attr(feature = "ts", derive(TS))]
5442#[cfg_attr(feature = "ts", ts(export))]
5443#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5445#[cfg_attr(feature = "serde", serde(tag = "type"))]
5446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5447#[repr(u32)]
5448#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
5449pub enum MavType {
5450 #[doc = "Generic micro air vehicle"]
5451 MAV_TYPE_GENERIC = 0,
5452 #[doc = "Fixed wing aircraft."]
5453 MAV_TYPE_FIXED_WING = 1,
5454 #[doc = "Quadrotor"]
5455 MAV_TYPE_QUADROTOR = 2,
5456 #[doc = "Coaxial helicopter"]
5457 MAV_TYPE_COAXIAL = 3,
5458 #[doc = "Normal helicopter with tail rotor."]
5459 MAV_TYPE_HELICOPTER = 4,
5460 #[doc = "Ground installation"]
5461 MAV_TYPE_ANTENNA_TRACKER = 5,
5462 #[doc = "Operator control unit / ground control station"]
5463 MAV_TYPE_GCS = 6,
5464 #[doc = "Airship, controlled"]
5465 MAV_TYPE_AIRSHIP = 7,
5466 #[doc = "Free balloon, uncontrolled"]
5467 MAV_TYPE_FREE_BALLOON = 8,
5468 #[doc = "Rocket"]
5469 MAV_TYPE_ROCKET = 9,
5470 #[doc = "Ground rover"]
5471 MAV_TYPE_GROUND_ROVER = 10,
5472 #[doc = "Surface vessel, boat, ship"]
5473 MAV_TYPE_SURFACE_BOAT = 11,
5474 #[doc = "Submarine"]
5475 MAV_TYPE_SUBMARINE = 12,
5476 #[doc = "Hexarotor"]
5477 MAV_TYPE_HEXAROTOR = 13,
5478 #[doc = "Octorotor"]
5479 MAV_TYPE_OCTOROTOR = 14,
5480 #[doc = "Tricopter"]
5481 MAV_TYPE_TRICOPTER = 15,
5482 #[doc = "Flapping wing"]
5483 MAV_TYPE_FLAPPING_WING = 16,
5484 #[doc = "Kite"]
5485 MAV_TYPE_KITE = 17,
5486 #[doc = "Onboard companion controller"]
5487 MAV_TYPE_ONBOARD_CONTROLLER = 18,
5488 #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
5489 MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
5490 #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
5491 MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
5492 #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
5493 MAV_TYPE_VTOL_TILTROTOR = 21,
5494 #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
5495 MAV_TYPE_VTOL_FIXEDROTOR = 22,
5496 #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
5497 MAV_TYPE_VTOL_TAILSITTER = 23,
5498 #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
5499 MAV_TYPE_VTOL_TILTWING = 24,
5500 #[doc = "VTOL reserved 5"]
5501 MAV_TYPE_VTOL_RESERVED5 = 25,
5502 #[doc = "Gimbal"]
5503 MAV_TYPE_GIMBAL = 26,
5504 #[doc = "ADSB system"]
5505 MAV_TYPE_ADSB = 27,
5506 #[doc = "Steerable, nonrigid airfoil"]
5507 MAV_TYPE_PARAFOIL = 28,
5508 #[doc = "Dodecarotor"]
5509 MAV_TYPE_DODECAROTOR = 29,
5510 #[doc = "Camera"]
5511 MAV_TYPE_CAMERA = 30,
5512 #[doc = "Charging station"]
5513 MAV_TYPE_CHARGING_STATION = 31,
5514 #[doc = "FLARM collision avoidance system"]
5515 MAV_TYPE_FLARM = 32,
5516 #[doc = "Servo"]
5517 MAV_TYPE_SERVO = 33,
5518 #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
5519 MAV_TYPE_ODID = 34,
5520 #[doc = "Decarotor"]
5521 MAV_TYPE_DECAROTOR = 35,
5522 #[doc = "Battery"]
5523 MAV_TYPE_BATTERY = 36,
5524 #[doc = "Parachute"]
5525 MAV_TYPE_PARACHUTE = 37,
5526 #[doc = "Log"]
5527 MAV_TYPE_LOG = 38,
5528 #[doc = "OSD"]
5529 MAV_TYPE_OSD = 39,
5530 #[doc = "IMU"]
5531 MAV_TYPE_IMU = 40,
5532 #[doc = "GPS"]
5533 MAV_TYPE_GPS = 41,
5534 #[doc = "Winch"]
5535 MAV_TYPE_WINCH = 42,
5536 #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
5537 MAV_TYPE_GENERIC_MULTIROTOR = 43,
5538 #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
5539 MAV_TYPE_ILLUMINATOR = 44,
5540 #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
5541 MAV_TYPE_SPACECRAFT_ORBITER = 45,
5542}
5543impl MavType {
5544 pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
5545}
5546impl Default for MavType {
5547 fn default() -> Self {
5548 Self::DEFAULT
5549 }
5550}
5551#[cfg_attr(feature = "ts", derive(TS))]
5552#[cfg_attr(feature = "ts", ts(export))]
5553#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5555#[cfg_attr(feature = "serde", serde(tag = "type"))]
5556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5557#[repr(u32)]
5558#[doc = "Enumeration of VTOL states"]
5559pub enum MavVtolState {
5560 #[doc = "MAV is not configured as VTOL"]
5561 MAV_VTOL_STATE_UNDEFINED = 0,
5562 #[doc = "VTOL is in transition from multicopter to fixed-wing"]
5563 MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
5564 #[doc = "VTOL is in transition from fixed-wing to multicopter"]
5565 MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
5566 #[doc = "VTOL is in multicopter state"]
5567 MAV_VTOL_STATE_MC = 3,
5568 #[doc = "VTOL is in fixed-wing state"]
5569 MAV_VTOL_STATE_FW = 4,
5570}
5571impl MavVtolState {
5572 pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
5573}
5574impl Default for MavVtolState {
5575 fn default() -> Self {
5576 Self::DEFAULT
5577 }
5578}
5579bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
5580impl MavWinchStatusFlag {
5581 pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
5582}
5583impl Default for MavWinchStatusFlag {
5584 fn default() -> Self {
5585 Self::DEFAULT
5586 }
5587}
5588#[cfg_attr(feature = "ts", derive(TS))]
5589#[cfg_attr(feature = "ts", ts(export))]
5590#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5592#[cfg_attr(feature = "serde", serde(tag = "type"))]
5593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5594#[repr(u32)]
5595pub enum MavlinkDataStreamType {
5596 MAVLINK_DATA_STREAM_IMG_JPEG = 0,
5597 MAVLINK_DATA_STREAM_IMG_BMP = 1,
5598 MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
5599 MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
5600 MAVLINK_DATA_STREAM_IMG_PGM = 4,
5601 MAVLINK_DATA_STREAM_IMG_PNG = 5,
5602}
5603impl MavlinkDataStreamType {
5604 pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
5605}
5606impl Default for MavlinkDataStreamType {
5607 fn default() -> Self {
5608 Self::DEFAULT
5609 }
5610}
5611#[cfg_attr(feature = "ts", derive(TS))]
5612#[cfg_attr(feature = "ts", ts(export))]
5613#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5615#[cfg_attr(feature = "serde", serde(tag = "type"))]
5616#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5617#[repr(u32)]
5618#[doc = "States of the mission state machine. Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended). They may not all be relevant on all vehicles."]
5619pub enum MissionState {
5620 #[doc = "The mission status reporting is not supported."]
5621 MISSION_STATE_UNKNOWN = 0,
5622 #[doc = "No mission on the vehicle."]
5623 MISSION_STATE_NO_MISSION = 1,
5624 #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
5625 MISSION_STATE_NOT_STARTED = 2,
5626 #[doc = "Mission is active, and will execute mission items when in auto mode."]
5627 MISSION_STATE_ACTIVE = 3,
5628 #[doc = "Mission is paused when in auto mode."]
5629 MISSION_STATE_PAUSED = 4,
5630 #[doc = "Mission has executed all mission items."]
5631 MISSION_STATE_COMPLETE = 5,
5632}
5633impl MissionState {
5634 pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
5635}
5636impl Default for MissionState {
5637 fn default() -> Self {
5638 Self::DEFAULT
5639 }
5640}
5641#[cfg_attr(feature = "ts", derive(TS))]
5642#[cfg_attr(feature = "ts", ts(export))]
5643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5645#[cfg_attr(feature = "serde", serde(tag = "type"))]
5646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5647#[repr(u32)]
5648#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
5649pub enum MotorTestOrder {
5650 #[doc = "Default autopilot motor test method."]
5651 MOTOR_TEST_ORDER_DEFAULT = 0,
5652 #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
5653 MOTOR_TEST_ORDER_SEQUENCE = 1,
5654 #[doc = "Motor numbers are specified as the output as labeled on the board."]
5655 MOTOR_TEST_ORDER_BOARD = 2,
5656}
5657impl MotorTestOrder {
5658 pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
5659}
5660impl Default for MotorTestOrder {
5661 fn default() -> Self {
5662 Self::DEFAULT
5663 }
5664}
5665#[cfg_attr(feature = "ts", derive(TS))]
5666#[cfg_attr(feature = "ts", ts(export))]
5667#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5669#[cfg_attr(feature = "serde", serde(tag = "type"))]
5670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5671#[repr(u32)]
5672#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
5673pub enum MotorTestThrottleType {
5674 #[doc = "Throttle as a percentage (0 ~ 100)"]
5675 MOTOR_TEST_THROTTLE_PERCENT = 0,
5676 #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
5677 MOTOR_TEST_THROTTLE_PWM = 1,
5678 #[doc = "Throttle pass-through from pilot's transmitter."]
5679 MOTOR_TEST_THROTTLE_PILOT = 2,
5680 #[doc = "Per-motor compass calibration test."]
5681 MOTOR_TEST_COMPASS_CAL = 3,
5682}
5683impl MotorTestThrottleType {
5684 pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
5685}
5686impl Default for MotorTestThrottleType {
5687 fn default() -> Self {
5688 Self::DEFAULT
5689 }
5690}
5691#[cfg_attr(feature = "ts", derive(TS))]
5692#[cfg_attr(feature = "ts", ts(export))]
5693#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5695#[cfg_attr(feature = "serde", serde(tag = "type"))]
5696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5697#[repr(u32)]
5698pub enum NavVtolLandOptions {
5699 #[doc = "Default autopilot landing behaviour."]
5700 NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
5701 #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground. The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
5702 NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
5703 #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
5704 NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
5705}
5706impl NavVtolLandOptions {
5707 pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
5708}
5709impl Default for NavVtolLandOptions {
5710 fn default() -> Self {
5711 Self::DEFAULT
5712 }
5713}
5714#[cfg_attr(feature = "ts", derive(TS))]
5715#[cfg_attr(feature = "ts", ts(export))]
5716#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5718#[cfg_attr(feature = "serde", serde(tag = "type"))]
5719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5720#[repr(u32)]
5721#[doc = "Yaw behaviour during orbit flight."]
5722pub enum OrbitYawBehaviour {
5723 #[doc = "Vehicle front points to the center (default)."]
5724 ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
5725 #[doc = "Vehicle front holds heading when message received."]
5726 ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
5727 #[doc = "Yaw uncontrolled."]
5728 ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
5729 #[doc = "Vehicle front follows flight path (tangential to circle)."]
5730 ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
5731 #[doc = "Yaw controlled by RC input."]
5732 ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
5733 #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
5734 ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
5735}
5736impl OrbitYawBehaviour {
5737 pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
5738}
5739impl Default for OrbitYawBehaviour {
5740 fn default() -> Self {
5741 Self::DEFAULT
5742 }
5743}
5744#[cfg_attr(feature = "ts", derive(TS))]
5745#[cfg_attr(feature = "ts", ts(export))]
5746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5748#[cfg_attr(feature = "serde", serde(tag = "type"))]
5749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5750#[repr(u32)]
5751#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
5752pub enum ParachuteAction {
5753 #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
5754 PARACHUTE_DISABLE = 0,
5755 #[doc = "Enable auto-release of parachute."]
5756 PARACHUTE_ENABLE = 1,
5757 #[doc = "Release parachute and kill motors."]
5758 PARACHUTE_RELEASE = 2,
5759}
5760impl ParachuteAction {
5761 pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
5762}
5763impl Default for ParachuteAction {
5764 fn default() -> Self {
5765 Self::DEFAULT
5766 }
5767}
5768#[cfg_attr(feature = "ts", derive(TS))]
5769#[cfg_attr(feature = "ts", ts(export))]
5770#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5772#[cfg_attr(feature = "serde", serde(tag = "type"))]
5773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5774#[repr(u32)]
5775#[doc = "Result from PARAM_EXT_SET message."]
5776pub enum ParamAck {
5777 #[doc = "Parameter value ACCEPTED and SET"]
5778 PARAM_ACK_ACCEPTED = 0,
5779 #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
5780 PARAM_ACK_VALUE_UNSUPPORTED = 1,
5781 #[doc = "Parameter failed to set"]
5782 PARAM_ACK_FAILED = 2,
5783 #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
5784 PARAM_ACK_IN_PROGRESS = 3,
5785}
5786impl ParamAck {
5787 pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
5788}
5789impl Default for ParamAck {
5790 fn default() -> Self {
5791 Self::DEFAULT
5792 }
5793}
5794bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
5795impl PositionTargetTypemask {
5796 pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
5797}
5798impl Default for PositionTargetTypemask {
5799 fn default() -> Self {
5800 Self::DEFAULT
5801 }
5802}
5803#[cfg_attr(feature = "ts", derive(TS))]
5804#[cfg_attr(feature = "ts", ts(export))]
5805#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5807#[cfg_attr(feature = "serde", serde(tag = "type"))]
5808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5809#[repr(u32)]
5810#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
5811pub enum PrecisionLandMode {
5812 #[doc = "Normal (non-precision) landing."]
5813 PRECISION_LAND_MODE_DISABLED = 0,
5814 #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
5815 PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
5816 #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
5817 PRECISION_LAND_MODE_REQUIRED = 2,
5818}
5819impl PrecisionLandMode {
5820 pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
5821}
5822impl Default for PrecisionLandMode {
5823 fn default() -> Self {
5824 Self::DEFAULT
5825 }
5826}
5827#[cfg_attr(feature = "ts", derive(TS))]
5828#[cfg_attr(feature = "ts", ts(export))]
5829#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5831#[cfg_attr(feature = "serde", serde(tag = "type"))]
5832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5833#[repr(u32)]
5834#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE. (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
5835pub enum PreflightStorageMissionAction {
5836 #[doc = "Read current mission data from persistent storage"]
5837 MISSION_READ_PERSISTENT = 0,
5838 #[doc = "Write current mission data to persistent storage"]
5839 MISSION_WRITE_PERSISTENT = 1,
5840 #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
5841 MISSION_RESET_DEFAULT = 2,
5842}
5843impl PreflightStorageMissionAction {
5844 pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
5845}
5846impl Default for PreflightStorageMissionAction {
5847 fn default() -> Self {
5848 Self::DEFAULT
5849 }
5850}
5851#[cfg_attr(feature = "ts", derive(TS))]
5852#[cfg_attr(feature = "ts", ts(export))]
5853#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5855#[cfg_attr(feature = "serde", serde(tag = "type"))]
5856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5857#[repr(u32)]
5858#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE. (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
5859pub enum PreflightStorageParameterAction {
5860 #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
5861 PARAM_READ_PERSISTENT = 0,
5862 #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
5863 PARAM_WRITE_PERSISTENT = 1,
5864 #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
5865 PARAM_RESET_CONFIG_DEFAULT = 2,
5866 #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
5867 PARAM_RESET_SENSOR_DEFAULT = 3,
5868 #[doc = "Reset all parameters, including operation counters, to default values"]
5869 PARAM_RESET_ALL_DEFAULT = 4,
5870}
5871impl PreflightStorageParameterAction {
5872 pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
5873}
5874impl Default for PreflightStorageParameterAction {
5875 fn default() -> Self {
5876 Self::DEFAULT
5877 }
5878}
5879#[cfg_attr(feature = "ts", derive(TS))]
5880#[cfg_attr(feature = "ts", ts(export))]
5881#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5883#[cfg_attr(feature = "serde", serde(tag = "type"))]
5884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5885#[repr(u32)]
5886#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
5887pub enum RcSubType {
5888 #[doc = "Spektrum DSM2"]
5889 RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
5890 #[doc = "Spektrum DSMX"]
5891 RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
5892 #[doc = "Spektrum DSMX8"]
5893 RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
5894}
5895impl RcSubType {
5896 pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
5897}
5898impl Default for RcSubType {
5899 fn default() -> Self {
5900 Self::DEFAULT
5901 }
5902}
5903#[cfg_attr(feature = "ts", derive(TS))]
5904#[cfg_attr(feature = "ts", ts(export))]
5905#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5907#[cfg_attr(feature = "serde", serde(tag = "type"))]
5908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5909#[repr(u32)]
5910#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
5911pub enum RcType {
5912 #[doc = "Spektrum"]
5913 RC_TYPE_SPEKTRUM = 0,
5914 #[doc = "CRSF"]
5915 RC_TYPE_CRSF = 1,
5916}
5917impl RcType {
5918 pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
5919}
5920impl Default for RcType {
5921 fn default() -> Self {
5922 Self::DEFAULT
5923 }
5924}
5925#[cfg_attr(feature = "ts", derive(TS))]
5926#[cfg_attr(feature = "ts", ts(export))]
5927#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5929#[cfg_attr(feature = "serde", serde(tag = "type"))]
5930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5931#[repr(u32)]
5932#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
5933pub enum RebootShutdownConditions {
5934 #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
5935 REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
5936 #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
5937 REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
5938}
5939impl RebootShutdownConditions {
5940 pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
5941}
5942impl Default for RebootShutdownConditions {
5943 fn default() -> Self {
5944 Self::DEFAULT
5945 }
5946}
5947#[cfg_attr(feature = "ts", derive(TS))]
5948#[cfg_attr(feature = "ts", ts(export))]
5949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5951#[cfg_attr(feature = "serde", serde(tag = "type"))]
5952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5953#[repr(u32)]
5954#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
5955pub enum RtkBaselineCoordinateSystem {
5956 #[doc = "Earth-centered, Earth-fixed"]
5957 RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
5958 #[doc = "RTK basestation centered, north, east, down"]
5959 RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
5960}
5961impl RtkBaselineCoordinateSystem {
5962 pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
5963}
5964impl Default for RtkBaselineCoordinateSystem {
5965 fn default() -> Self {
5966 Self::DEFAULT
5967 }
5968}
5969#[cfg_attr(feature = "ts", derive(TS))]
5970#[cfg_attr(feature = "ts", ts(export))]
5971#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5973#[cfg_attr(feature = "serde", serde(tag = "type"))]
5974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5975#[repr(u32)]
5976#[doc = "Possible safety switch states."]
5977pub enum SafetySwitchState {
5978 #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
5979 SAFETY_SWITCH_STATE_SAFE = 0,
5980 #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
5981 SAFETY_SWITCH_STATE_DANGEROUS = 1,
5982}
5983impl SafetySwitchState {
5984 pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
5985}
5986impl Default for SafetySwitchState {
5987 fn default() -> Self {
5988 Self::DEFAULT
5989 }
5990}
5991#[cfg_attr(feature = "ts", derive(TS))]
5992#[cfg_attr(feature = "ts", ts(export))]
5993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5995#[cfg_attr(feature = "serde", serde(tag = "type"))]
5996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5997#[repr(u32)]
5998#[doc = "SERIAL_CONTROL device types"]
5999pub enum SerialControlDev {
6000 #[doc = "First telemetry port"]
6001 SERIAL_CONTROL_DEV_TELEM1 = 0,
6002 #[doc = "Second telemetry port"]
6003 SERIAL_CONTROL_DEV_TELEM2 = 1,
6004 #[doc = "First GPS port"]
6005 SERIAL_CONTROL_DEV_GPS1 = 2,
6006 #[doc = "Second GPS port"]
6007 SERIAL_CONTROL_DEV_GPS2 = 3,
6008 #[doc = "system shell"]
6009 SERIAL_CONTROL_DEV_SHELL = 10,
6010 #[doc = "SERIAL0"]
6011 SERIAL_CONTROL_SERIAL0 = 100,
6012 #[doc = "SERIAL1"]
6013 SERIAL_CONTROL_SERIAL1 = 101,
6014 #[doc = "SERIAL2"]
6015 SERIAL_CONTROL_SERIAL2 = 102,
6016 #[doc = "SERIAL3"]
6017 SERIAL_CONTROL_SERIAL3 = 103,
6018 #[doc = "SERIAL4"]
6019 SERIAL_CONTROL_SERIAL4 = 104,
6020 #[doc = "SERIAL5"]
6021 SERIAL_CONTROL_SERIAL5 = 105,
6022 #[doc = "SERIAL6"]
6023 SERIAL_CONTROL_SERIAL6 = 106,
6024 #[doc = "SERIAL7"]
6025 SERIAL_CONTROL_SERIAL7 = 107,
6026 #[doc = "SERIAL8"]
6027 SERIAL_CONTROL_SERIAL8 = 108,
6028 #[doc = "SERIAL9"]
6029 SERIAL_CONTROL_SERIAL9 = 109,
6030}
6031impl SerialControlDev {
6032 pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
6033}
6034impl Default for SerialControlDev {
6035 fn default() -> Self {
6036 Self::DEFAULT
6037 }
6038}
6039bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
6040impl SerialControlFlag {
6041 pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
6042}
6043impl Default for SerialControlFlag {
6044 fn default() -> Self {
6045 Self::DEFAULT
6046 }
6047}
6048#[cfg_attr(feature = "ts", derive(TS))]
6049#[cfg_attr(feature = "ts", ts(export))]
6050#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6052#[cfg_attr(feature = "serde", serde(tag = "type"))]
6053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6054#[repr(u32)]
6055#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
6056pub enum SetFocusType {
6057 #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
6058 FOCUS_TYPE_STEP = 0,
6059 #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
6060 FOCUS_TYPE_CONTINUOUS = 1,
6061 #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
6062 FOCUS_TYPE_RANGE = 2,
6063 #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
6064 FOCUS_TYPE_METERS = 3,
6065 #[doc = "Focus automatically."]
6066 FOCUS_TYPE_AUTO = 4,
6067 #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
6068 FOCUS_TYPE_AUTO_SINGLE = 5,
6069 #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
6070 FOCUS_TYPE_AUTO_CONTINUOUS = 6,
6071}
6072impl SetFocusType {
6073 pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
6074}
6075impl Default for SetFocusType {
6076 fn default() -> Self {
6077 Self::DEFAULT
6078 }
6079}
6080#[cfg_attr(feature = "ts", derive(TS))]
6081#[cfg_attr(feature = "ts", ts(export))]
6082#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6084#[cfg_attr(feature = "serde", serde(tag = "type"))]
6085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6086#[repr(u32)]
6087#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
6088pub enum SpeedType {
6089 #[doc = "Airspeed"]
6090 SPEED_TYPE_AIRSPEED = 0,
6091 #[doc = "Groundspeed"]
6092 SPEED_TYPE_GROUNDSPEED = 1,
6093 #[doc = "Climb speed"]
6094 SPEED_TYPE_CLIMB_SPEED = 2,
6095 #[doc = "Descent speed"]
6096 SPEED_TYPE_DESCENT_SPEED = 3,
6097}
6098impl SpeedType {
6099 pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
6100}
6101impl Default for SpeedType {
6102 fn default() -> Self {
6103 Self::DEFAULT
6104 }
6105}
6106#[cfg_attr(feature = "ts", derive(TS))]
6107#[cfg_attr(feature = "ts", ts(export))]
6108#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6110#[cfg_attr(feature = "serde", serde(tag = "type"))]
6111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6112#[repr(u32)]
6113#[doc = "Flags to indicate the status of camera storage."]
6114pub enum StorageStatus {
6115 #[doc = "Storage is missing (no microSD card loaded for example.)"]
6116 STORAGE_STATUS_EMPTY = 0,
6117 #[doc = "Storage present but unformatted."]
6118 STORAGE_STATUS_UNFORMATTED = 1,
6119 #[doc = "Storage present and ready."]
6120 STORAGE_STATUS_READY = 2,
6121 #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
6122 STORAGE_STATUS_NOT_SUPPORTED = 3,
6123}
6124impl StorageStatus {
6125 pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
6126}
6127impl Default for StorageStatus {
6128 fn default() -> Self {
6129 Self::DEFAULT
6130 }
6131}
6132#[cfg_attr(feature = "ts", derive(TS))]
6133#[cfg_attr(feature = "ts", ts(export))]
6134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6136#[cfg_attr(feature = "serde", serde(tag = "type"))]
6137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6138#[repr(u32)]
6139#[doc = "Flags to indicate the type of storage."]
6140pub enum StorageType {
6141 #[doc = "Storage type is not known."]
6142 STORAGE_TYPE_UNKNOWN = 0,
6143 #[doc = "Storage type is USB device."]
6144 STORAGE_TYPE_USB_STICK = 1,
6145 #[doc = "Storage type is SD card."]
6146 STORAGE_TYPE_SD = 2,
6147 #[doc = "Storage type is microSD card."]
6148 STORAGE_TYPE_MICROSD = 3,
6149 #[doc = "Storage type is CFast."]
6150 STORAGE_TYPE_CF = 4,
6151 #[doc = "Storage type is CFexpress."]
6152 STORAGE_TYPE_CFE = 5,
6153 #[doc = "Storage type is XQD."]
6154 STORAGE_TYPE_XQD = 6,
6155 #[doc = "Storage type is HD mass storage type."]
6156 STORAGE_TYPE_HD = 7,
6157 #[doc = "Storage type is other, not listed type."]
6158 STORAGE_TYPE_OTHER = 254,
6159}
6160impl StorageType {
6161 pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
6162}
6163impl Default for StorageType {
6164 fn default() -> Self {
6165 Self::DEFAULT
6166 }
6167}
6168bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
6169impl StorageUsageFlag {
6170 pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
6171}
6172impl Default for StorageUsageFlag {
6173 fn default() -> Self {
6174 Self::DEFAULT
6175 }
6176}
6177#[cfg_attr(feature = "ts", derive(TS))]
6178#[cfg_attr(feature = "ts", ts(export))]
6179#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6181#[cfg_attr(feature = "serde", serde(tag = "type"))]
6182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6183#[repr(u32)]
6184#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
6185pub enum TuneFormat {
6186 #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
6187 TUNE_FORMAT_QBASIC1_1 = 1,
6188 #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
6189 TUNE_FORMAT_MML_MODERN = 2,
6190}
6191impl TuneFormat {
6192 pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
6193}
6194impl Default for TuneFormat {
6195 fn default() -> Self {
6196 Self::DEFAULT
6197 }
6198}
6199#[cfg_attr(feature = "ts", derive(TS))]
6200#[cfg_attr(feature = "ts", ts(export))]
6201#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6203#[cfg_attr(feature = "serde", serde(tag = "type"))]
6204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6205#[repr(u32)]
6206#[doc = "Generalized UAVCAN node health"]
6207pub enum UavcanNodeHealth {
6208 #[doc = "The node is functioning properly."]
6209 UAVCAN_NODE_HEALTH_OK = 0,
6210 #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
6211 UAVCAN_NODE_HEALTH_WARNING = 1,
6212 #[doc = "The node has encountered a major failure."]
6213 UAVCAN_NODE_HEALTH_ERROR = 2,
6214 #[doc = "The node has suffered a fatal malfunction."]
6215 UAVCAN_NODE_HEALTH_CRITICAL = 3,
6216}
6217impl UavcanNodeHealth {
6218 pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
6219}
6220impl Default for UavcanNodeHealth {
6221 fn default() -> Self {
6222 Self::DEFAULT
6223 }
6224}
6225#[cfg_attr(feature = "ts", derive(TS))]
6226#[cfg_attr(feature = "ts", ts(export))]
6227#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6229#[cfg_attr(feature = "serde", serde(tag = "type"))]
6230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6231#[repr(u32)]
6232#[doc = "Generalized UAVCAN node mode"]
6233pub enum UavcanNodeMode {
6234 #[doc = "The node is performing its primary functions."]
6235 UAVCAN_NODE_MODE_OPERATIONAL = 0,
6236 #[doc = "The node is initializing; this mode is entered immediately after startup."]
6237 UAVCAN_NODE_MODE_INITIALIZATION = 1,
6238 #[doc = "The node is under maintenance."]
6239 UAVCAN_NODE_MODE_MAINTENANCE = 2,
6240 #[doc = "The node is in the process of updating its software."]
6241 UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
6242 #[doc = "The node is no longer available online."]
6243 UAVCAN_NODE_MODE_OFFLINE = 7,
6244}
6245impl UavcanNodeMode {
6246 pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
6247}
6248impl Default for UavcanNodeMode {
6249 fn default() -> Self {
6250 Self::DEFAULT
6251 }
6252}
6253bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
6254impl UtmDataAvailFlags {
6255 pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
6256}
6257impl Default for UtmDataAvailFlags {
6258 fn default() -> Self {
6259 Self::DEFAULT
6260 }
6261}
6262#[cfg_attr(feature = "ts", derive(TS))]
6263#[cfg_attr(feature = "ts", ts(export))]
6264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6266#[cfg_attr(feature = "serde", serde(tag = "type"))]
6267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6268#[repr(u32)]
6269#[doc = "Airborne status of UAS."]
6270pub enum UtmFlightState {
6271 #[doc = "The flight state can't be determined."]
6272 UTM_FLIGHT_STATE_UNKNOWN = 1,
6273 #[doc = "UAS on ground."]
6274 UTM_FLIGHT_STATE_GROUND = 2,
6275 #[doc = "UAS airborne."]
6276 UTM_FLIGHT_STATE_AIRBORNE = 3,
6277 #[doc = "UAS is in an emergency flight state."]
6278 UTM_FLIGHT_STATE_EMERGENCY = 16,
6279 #[doc = "UAS has no active controls."]
6280 UTM_FLIGHT_STATE_NOCTRL = 32,
6281}
6282impl UtmFlightState {
6283 pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
6284}
6285impl Default for UtmFlightState {
6286 fn default() -> Self {
6287 Self::DEFAULT
6288 }
6289}
6290#[cfg_attr(feature = "ts", derive(TS))]
6291#[cfg_attr(feature = "ts", ts(export))]
6292#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6294#[cfg_attr(feature = "serde", serde(tag = "type"))]
6295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6296#[repr(u32)]
6297#[doc = "Video stream encodings"]
6298pub enum VideoStreamEncoding {
6299 #[doc = "Stream encoding is unknown"]
6300 VIDEO_STREAM_ENCODING_UNKNOWN = 0,
6301 #[doc = "Stream encoding is H.264"]
6302 VIDEO_STREAM_ENCODING_H264 = 1,
6303 #[doc = "Stream encoding is H.265"]
6304 VIDEO_STREAM_ENCODING_H265 = 2,
6305}
6306impl VideoStreamEncoding {
6307 pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
6308}
6309impl Default for VideoStreamEncoding {
6310 fn default() -> Self {
6311 Self::DEFAULT
6312 }
6313}
6314bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
6315impl VideoStreamStatusFlags {
6316 pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
6317}
6318impl Default for VideoStreamStatusFlags {
6319 fn default() -> Self {
6320 Self::DEFAULT
6321 }
6322}
6323#[cfg_attr(feature = "ts", derive(TS))]
6324#[cfg_attr(feature = "ts", ts(export))]
6325#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6327#[cfg_attr(feature = "serde", serde(tag = "type"))]
6328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6329#[repr(u32)]
6330#[doc = "Video stream types"]
6331pub enum VideoStreamType {
6332 #[doc = "Stream is RTSP"]
6333 VIDEO_STREAM_TYPE_RTSP = 0,
6334 #[doc = "Stream is RTP UDP (URI gives the port number)"]
6335 VIDEO_STREAM_TYPE_RTPUDP = 1,
6336 #[doc = "Stream is MPEG on TCP"]
6337 VIDEO_STREAM_TYPE_TCP_MPEG = 2,
6338 #[doc = "Stream is MPEG TS (URI gives the port number)"]
6339 VIDEO_STREAM_TYPE_MPEG_TS = 3,
6340}
6341impl VideoStreamType {
6342 pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
6343}
6344impl Default for VideoStreamType {
6345 fn default() -> Self {
6346 Self::DEFAULT
6347 }
6348}
6349#[cfg_attr(feature = "ts", derive(TS))]
6350#[cfg_attr(feature = "ts", ts(export))]
6351#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6353#[cfg_attr(feature = "serde", serde(tag = "type"))]
6354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6355#[repr(u32)]
6356#[doc = "Direction of VTOL transition"]
6357pub enum VtolTransitionHeading {
6358 #[doc = "Respect the heading configuration of the vehicle."]
6359 VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
6360 #[doc = "Use the heading pointing towards the next waypoint."]
6361 VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
6362 #[doc = "Use the heading on takeoff (while sitting on the ground)."]
6363 VTOL_TRANSITION_HEADING_TAKEOFF = 2,
6364 #[doc = "Use the specified heading in parameter 4."]
6365 VTOL_TRANSITION_HEADING_SPECIFIED = 3,
6366 #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
6367 VTOL_TRANSITION_HEADING_ANY = 4,
6368}
6369impl VtolTransitionHeading {
6370 pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
6371}
6372impl Default for VtolTransitionHeading {
6373 fn default() -> Self {
6374 Self::DEFAULT
6375 }
6376}
6377#[cfg_attr(feature = "ts", derive(TS))]
6378#[cfg_attr(feature = "ts", ts(export))]
6379#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6381#[cfg_attr(feature = "serde", serde(tag = "type"))]
6382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6383#[repr(u32)]
6384#[doc = "WiFi Mode."]
6385pub enum WifiConfigApMode {
6386 #[doc = "WiFi mode is undefined."]
6387 WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
6388 #[doc = "WiFi configured as an access point."]
6389 WIFI_CONFIG_AP_MODE_AP = 1,
6390 #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
6391 WIFI_CONFIG_AP_MODE_STATION = 2,
6392 #[doc = "WiFi disabled."]
6393 WIFI_CONFIG_AP_MODE_DISABLED = 3,
6394}
6395impl WifiConfigApMode {
6396 pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
6397}
6398impl Default for WifiConfigApMode {
6399 fn default() -> Self {
6400 Self::DEFAULT
6401 }
6402}
6403#[cfg_attr(feature = "ts", derive(TS))]
6404#[cfg_attr(feature = "ts", ts(export))]
6405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6407#[cfg_attr(feature = "serde", serde(tag = "type"))]
6408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6409#[repr(u32)]
6410#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
6411pub enum WifiConfigApResponse {
6412 #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
6413 WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
6414 #[doc = "Changes accepted."]
6415 WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
6416 #[doc = "Changes rejected."]
6417 WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
6418 #[doc = "Invalid Mode."]
6419 WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
6420 #[doc = "Invalid SSID."]
6421 WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
6422 #[doc = "Invalid Password."]
6423 WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
6424}
6425impl WifiConfigApResponse {
6426 pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
6427}
6428impl Default for WifiConfigApResponse {
6429 fn default() -> Self {
6430 Self::DEFAULT
6431 }
6432}
6433#[cfg_attr(feature = "ts", derive(TS))]
6434#[cfg_attr(feature = "ts", ts(export))]
6435#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6437#[cfg_attr(feature = "serde", serde(tag = "type"))]
6438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6439#[repr(u32)]
6440#[doc = "Winch actions."]
6441pub enum WinchActions {
6442 #[doc = "Allow motor to freewheel."]
6443 WINCH_RELAXED = 0,
6444 #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
6445 WINCH_RELATIVE_LENGTH_CONTROL = 1,
6446 #[doc = "Wind or unwind line at specified rate."]
6447 WINCH_RATE_CONTROL = 2,
6448 #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
6449 WINCH_LOCK = 3,
6450 #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
6451 WINCH_DELIVER = 4,
6452 #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
6453 WINCH_HOLD = 5,
6454 #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
6455 WINCH_RETRACT = 6,
6456 #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
6457 WINCH_LOAD_LINE = 7,
6458 #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
6459 WINCH_ABANDON_LINE = 8,
6460 #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
6461 WINCH_LOAD_PAYLOAD = 9,
6462}
6463impl WinchActions {
6464 pub const DEFAULT: Self = Self::WINCH_RELAXED;
6465}
6466impl Default for WinchActions {
6467 fn default() -> Self {
6468 Self::DEFAULT
6469 }
6470}
6471#[doc = "Set the vehicle attitude and body angular rates."]
6472#[doc = ""]
6473#[doc = "ID: 140"]
6474#[derive(Debug, Clone, PartialEq)]
6475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6477#[cfg_attr(feature = "ts", derive(TS))]
6478#[cfg_attr(feature = "ts", ts(export))]
6479pub struct ACTUATOR_CONTROL_TARGET_DATA {
6480 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6481 pub time_usec: u64,
6482 #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
6483 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6484 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6485 pub controls: [f32; 8],
6486 #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
6487 pub group_mlx: u8,
6488}
6489impl ACTUATOR_CONTROL_TARGET_DATA {
6490 pub const ENCODED_LEN: usize = 41usize;
6491 pub const DEFAULT: Self = Self {
6492 time_usec: 0_u64,
6493 controls: [0.0_f32; 8usize],
6494 group_mlx: 0_u8,
6495 };
6496 #[cfg(feature = "arbitrary")]
6497 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6498 use arbitrary::{Arbitrary, Unstructured};
6499 let mut buf = [0u8; 1024];
6500 rng.fill_bytes(&mut buf);
6501 let mut unstructured = Unstructured::new(&buf);
6502 Self::arbitrary(&mut unstructured).unwrap_or_default()
6503 }
6504}
6505impl Default for ACTUATOR_CONTROL_TARGET_DATA {
6506 fn default() -> Self {
6507 Self::DEFAULT.clone()
6508 }
6509}
6510impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
6511 type Message = MavMessage;
6512 const ID: u32 = 140u32;
6513 const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
6514 const EXTRA_CRC: u8 = 181u8;
6515 const ENCODED_LEN: usize = 41usize;
6516 fn deser(
6517 _version: MavlinkVersion,
6518 __input: &[u8],
6519 ) -> Result<Self, ::mavlink_core::error::ParserError> {
6520 let avail_len = __input.len();
6521 let mut payload_buf = [0; Self::ENCODED_LEN];
6522 let mut buf = if avail_len < Self::ENCODED_LEN {
6523 payload_buf[0..avail_len].copy_from_slice(__input);
6524 Bytes::new(&payload_buf)
6525 } else {
6526 Bytes::new(__input)
6527 };
6528 let mut __struct = Self::default();
6529 __struct.time_usec = buf.get_u64_le()?;
6530 for v in &mut __struct.controls {
6531 let val = buf.get_f32_le()?;
6532 *v = val;
6533 }
6534 __struct.group_mlx = buf.get_u8()?;
6535 Ok(__struct)
6536 }
6537 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6538 let mut __tmp = BytesMut::new(bytes);
6539 #[allow(clippy::absurd_extreme_comparisons)]
6540 #[allow(unused_comparisons)]
6541 if __tmp.remaining() < Self::ENCODED_LEN {
6542 panic!(
6543 "buffer is too small (need {} bytes, but got {})",
6544 Self::ENCODED_LEN,
6545 __tmp.remaining(),
6546 )
6547 }
6548 __tmp.put_u64_le(self.time_usec);
6549 for val in &self.controls {
6550 __tmp.put_f32_le(*val);
6551 }
6552 __tmp.put_u8(self.group_mlx);
6553 if matches!(version, MavlinkVersion::V2) {
6554 let len = __tmp.len();
6555 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6556 } else {
6557 __tmp.len()
6558 }
6559 }
6560}
6561#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
6562#[doc = ""]
6563#[doc = "ID: 375"]
6564#[derive(Debug, Clone, PartialEq)]
6565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6567#[cfg_attr(feature = "ts", derive(TS))]
6568#[cfg_attr(feature = "ts", ts(export))]
6569pub struct ACTUATOR_OUTPUT_STATUS_DATA {
6570 #[doc = "Timestamp (since system boot)."]
6571 pub time_usec: u64,
6572 #[doc = "Active outputs"]
6573 pub active: u32,
6574 #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
6575 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6576 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6577 pub actuator: [f32; 32],
6578}
6579impl ACTUATOR_OUTPUT_STATUS_DATA {
6580 pub const ENCODED_LEN: usize = 140usize;
6581 pub const DEFAULT: Self = Self {
6582 time_usec: 0_u64,
6583 active: 0_u32,
6584 actuator: [0.0_f32; 32usize],
6585 };
6586 #[cfg(feature = "arbitrary")]
6587 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6588 use arbitrary::{Arbitrary, Unstructured};
6589 let mut buf = [0u8; 1024];
6590 rng.fill_bytes(&mut buf);
6591 let mut unstructured = Unstructured::new(&buf);
6592 Self::arbitrary(&mut unstructured).unwrap_or_default()
6593 }
6594}
6595impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
6596 fn default() -> Self {
6597 Self::DEFAULT.clone()
6598 }
6599}
6600impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
6601 type Message = MavMessage;
6602 const ID: u32 = 375u32;
6603 const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
6604 const EXTRA_CRC: u8 = 251u8;
6605 const ENCODED_LEN: usize = 140usize;
6606 fn deser(
6607 _version: MavlinkVersion,
6608 __input: &[u8],
6609 ) -> Result<Self, ::mavlink_core::error::ParserError> {
6610 let avail_len = __input.len();
6611 let mut payload_buf = [0; Self::ENCODED_LEN];
6612 let mut buf = if avail_len < Self::ENCODED_LEN {
6613 payload_buf[0..avail_len].copy_from_slice(__input);
6614 Bytes::new(&payload_buf)
6615 } else {
6616 Bytes::new(__input)
6617 };
6618 let mut __struct = Self::default();
6619 __struct.time_usec = buf.get_u64_le()?;
6620 __struct.active = buf.get_u32_le()?;
6621 for v in &mut __struct.actuator {
6622 let val = buf.get_f32_le()?;
6623 *v = val;
6624 }
6625 Ok(__struct)
6626 }
6627 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6628 let mut __tmp = BytesMut::new(bytes);
6629 #[allow(clippy::absurd_extreme_comparisons)]
6630 #[allow(unused_comparisons)]
6631 if __tmp.remaining() < Self::ENCODED_LEN {
6632 panic!(
6633 "buffer is too small (need {} bytes, but got {})",
6634 Self::ENCODED_LEN,
6635 __tmp.remaining(),
6636 )
6637 }
6638 __tmp.put_u64_le(self.time_usec);
6639 __tmp.put_u32_le(self.active);
6640 for val in &self.actuator {
6641 __tmp.put_f32_le(*val);
6642 }
6643 if matches!(version, MavlinkVersion::V2) {
6644 let len = __tmp.len();
6645 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6646 } else {
6647 __tmp.len()
6648 }
6649 }
6650}
6651#[doc = "The location and information of an ADSB vehicle."]
6652#[doc = ""]
6653#[doc = "ID: 246"]
6654#[derive(Debug, Clone, PartialEq)]
6655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6657#[cfg_attr(feature = "ts", derive(TS))]
6658#[cfg_attr(feature = "ts", ts(export))]
6659pub struct ADSB_VEHICLE_DATA {
6660 #[doc = "ICAO address"]
6661 pub ICAO_address: u32,
6662 #[doc = "Latitude"]
6663 pub lat: i32,
6664 #[doc = "Longitude"]
6665 pub lon: i32,
6666 #[doc = "Altitude(ASL)"]
6667 pub altitude: i32,
6668 #[doc = "Course over ground"]
6669 pub heading: u16,
6670 #[doc = "The horizontal velocity"]
6671 pub hor_velocity: u16,
6672 #[doc = "The vertical velocity. Positive is up"]
6673 pub ver_velocity: i16,
6674 #[doc = "Bitmap to indicate various statuses including valid data fields"]
6675 pub flags: AdsbFlags,
6676 #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
6677 pub squawk: u16,
6678 #[doc = "ADSB altitude type."]
6679 pub altitude_type: AdsbAltitudeType,
6680 #[doc = "The callsign, 8+null"]
6681 #[cfg_attr(feature = "ts", ts(type = "string"))]
6682 pub callsign: CharArray<9>,
6683 #[doc = "ADSB emitter type."]
6684 pub emitter_type: AdsbEmitterType,
6685 #[doc = "Time since last communication in seconds"]
6686 pub tslc: u8,
6687}
6688impl ADSB_VEHICLE_DATA {
6689 pub const ENCODED_LEN: usize = 38usize;
6690 pub const DEFAULT: Self = Self {
6691 ICAO_address: 0_u32,
6692 lat: 0_i32,
6693 lon: 0_i32,
6694 altitude: 0_i32,
6695 heading: 0_u16,
6696 hor_velocity: 0_u16,
6697 ver_velocity: 0_i16,
6698 flags: AdsbFlags::DEFAULT,
6699 squawk: 0_u16,
6700 altitude_type: AdsbAltitudeType::DEFAULT,
6701 callsign: CharArray::new([0_u8; 9usize]),
6702 emitter_type: AdsbEmitterType::DEFAULT,
6703 tslc: 0_u8,
6704 };
6705 #[cfg(feature = "arbitrary")]
6706 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6707 use arbitrary::{Arbitrary, Unstructured};
6708 let mut buf = [0u8; 1024];
6709 rng.fill_bytes(&mut buf);
6710 let mut unstructured = Unstructured::new(&buf);
6711 Self::arbitrary(&mut unstructured).unwrap_or_default()
6712 }
6713}
6714impl Default for ADSB_VEHICLE_DATA {
6715 fn default() -> Self {
6716 Self::DEFAULT.clone()
6717 }
6718}
6719impl MessageData for ADSB_VEHICLE_DATA {
6720 type Message = MavMessage;
6721 const ID: u32 = 246u32;
6722 const NAME: &'static str = "ADSB_VEHICLE";
6723 const EXTRA_CRC: u8 = 184u8;
6724 const ENCODED_LEN: usize = 38usize;
6725 fn deser(
6726 _version: MavlinkVersion,
6727 __input: &[u8],
6728 ) -> Result<Self, ::mavlink_core::error::ParserError> {
6729 let avail_len = __input.len();
6730 let mut payload_buf = [0; Self::ENCODED_LEN];
6731 let mut buf = if avail_len < Self::ENCODED_LEN {
6732 payload_buf[0..avail_len].copy_from_slice(__input);
6733 Bytes::new(&payload_buf)
6734 } else {
6735 Bytes::new(__input)
6736 };
6737 let mut __struct = Self::default();
6738 __struct.ICAO_address = buf.get_u32_le()?;
6739 __struct.lat = buf.get_i32_le()?;
6740 __struct.lon = buf.get_i32_le()?;
6741 __struct.altitude = buf.get_i32_le()?;
6742 __struct.heading = buf.get_u16_le()?;
6743 __struct.hor_velocity = buf.get_u16_le()?;
6744 __struct.ver_velocity = buf.get_i16_le()?;
6745 let tmp = buf.get_u16_le()?;
6746 __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
6747 ::mavlink_core::error::ParserError::InvalidFlag {
6748 flag_type: "AdsbFlags",
6749 value: tmp as u64,
6750 },
6751 )?;
6752 __struct.squawk = buf.get_u16_le()?;
6753 let tmp = buf.get_u8()?;
6754 __struct.altitude_type =
6755 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6756 enum_type: "AdsbAltitudeType",
6757 value: tmp as u64,
6758 })?;
6759 let mut tmp = [0_u8; 9usize];
6760 for v in &mut tmp {
6761 *v = buf.get_u8()?;
6762 }
6763 __struct.callsign = CharArray::new(tmp);
6764 let tmp = buf.get_u8()?;
6765 __struct.emitter_type =
6766 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6767 enum_type: "AdsbEmitterType",
6768 value: tmp as u64,
6769 })?;
6770 __struct.tslc = buf.get_u8()?;
6771 Ok(__struct)
6772 }
6773 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6774 let mut __tmp = BytesMut::new(bytes);
6775 #[allow(clippy::absurd_extreme_comparisons)]
6776 #[allow(unused_comparisons)]
6777 if __tmp.remaining() < Self::ENCODED_LEN {
6778 panic!(
6779 "buffer is too small (need {} bytes, but got {})",
6780 Self::ENCODED_LEN,
6781 __tmp.remaining(),
6782 )
6783 }
6784 __tmp.put_u32_le(self.ICAO_address);
6785 __tmp.put_i32_le(self.lat);
6786 __tmp.put_i32_le(self.lon);
6787 __tmp.put_i32_le(self.altitude);
6788 __tmp.put_u16_le(self.heading);
6789 __tmp.put_u16_le(self.hor_velocity);
6790 __tmp.put_i16_le(self.ver_velocity);
6791 __tmp.put_u16_le(self.flags.bits() as u16);
6792 __tmp.put_u16_le(self.squawk);
6793 __tmp.put_u8(self.altitude_type as u8);
6794 for val in &self.callsign {
6795 __tmp.put_u8(*val);
6796 }
6797 __tmp.put_u8(self.emitter_type as u8);
6798 __tmp.put_u8(self.tslc);
6799 if matches!(version, MavlinkVersion::V2) {
6800 let len = __tmp.len();
6801 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6802 } else {
6803 __tmp.len()
6804 }
6805 }
6806}
6807#[doc = "The location and information of an AIS vessel."]
6808#[doc = ""]
6809#[doc = "ID: 301"]
6810#[derive(Debug, Clone, PartialEq)]
6811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6813#[cfg_attr(feature = "ts", derive(TS))]
6814#[cfg_attr(feature = "ts", ts(export))]
6815pub struct AIS_VESSEL_DATA {
6816 #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
6817 pub MMSI: u32,
6818 #[doc = "Latitude"]
6819 pub lat: i32,
6820 #[doc = "Longitude"]
6821 pub lon: i32,
6822 #[doc = "Course over ground"]
6823 pub COG: u16,
6824 #[doc = "True heading"]
6825 pub heading: u16,
6826 #[doc = "Speed over ground"]
6827 pub velocity: u16,
6828 #[doc = "Distance from lat/lon location to bow"]
6829 pub dimension_bow: u16,
6830 #[doc = "Distance from lat/lon location to stern"]
6831 pub dimension_stern: u16,
6832 #[doc = "Time since last communication in seconds"]
6833 pub tslc: u16,
6834 #[doc = "Bitmask to indicate various statuses including valid data fields"]
6835 pub flags: AisFlags,
6836 #[doc = "Turn rate"]
6837 pub turn_rate: i8,
6838 #[doc = "Navigational status"]
6839 pub navigational_status: AisNavStatus,
6840 #[doc = "Type of vessels"]
6841 pub mavtype: AisType,
6842 #[doc = "Distance from lat/lon location to port side"]
6843 pub dimension_port: u8,
6844 #[doc = "Distance from lat/lon location to starboard side"]
6845 pub dimension_starboard: u8,
6846 #[doc = "The vessel callsign"]
6847 #[cfg_attr(feature = "ts", ts(type = "string"))]
6848 pub callsign: CharArray<7>,
6849 #[doc = "The vessel name"]
6850 #[cfg_attr(feature = "ts", ts(type = "string"))]
6851 pub name: CharArray<20>,
6852}
6853impl AIS_VESSEL_DATA {
6854 pub const ENCODED_LEN: usize = 58usize;
6855 pub const DEFAULT: Self = Self {
6856 MMSI: 0_u32,
6857 lat: 0_i32,
6858 lon: 0_i32,
6859 COG: 0_u16,
6860 heading: 0_u16,
6861 velocity: 0_u16,
6862 dimension_bow: 0_u16,
6863 dimension_stern: 0_u16,
6864 tslc: 0_u16,
6865 flags: AisFlags::DEFAULT,
6866 turn_rate: 0_i8,
6867 navigational_status: AisNavStatus::DEFAULT,
6868 mavtype: AisType::DEFAULT,
6869 dimension_port: 0_u8,
6870 dimension_starboard: 0_u8,
6871 callsign: CharArray::new([0_u8; 7usize]),
6872 name: CharArray::new([0_u8; 20usize]),
6873 };
6874 #[cfg(feature = "arbitrary")]
6875 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6876 use arbitrary::{Arbitrary, Unstructured};
6877 let mut buf = [0u8; 1024];
6878 rng.fill_bytes(&mut buf);
6879 let mut unstructured = Unstructured::new(&buf);
6880 Self::arbitrary(&mut unstructured).unwrap_or_default()
6881 }
6882}
6883impl Default for AIS_VESSEL_DATA {
6884 fn default() -> Self {
6885 Self::DEFAULT.clone()
6886 }
6887}
6888impl MessageData for AIS_VESSEL_DATA {
6889 type Message = MavMessage;
6890 const ID: u32 = 301u32;
6891 const NAME: &'static str = "AIS_VESSEL";
6892 const EXTRA_CRC: u8 = 243u8;
6893 const ENCODED_LEN: usize = 58usize;
6894 fn deser(
6895 _version: MavlinkVersion,
6896 __input: &[u8],
6897 ) -> Result<Self, ::mavlink_core::error::ParserError> {
6898 let avail_len = __input.len();
6899 let mut payload_buf = [0; Self::ENCODED_LEN];
6900 let mut buf = if avail_len < Self::ENCODED_LEN {
6901 payload_buf[0..avail_len].copy_from_slice(__input);
6902 Bytes::new(&payload_buf)
6903 } else {
6904 Bytes::new(__input)
6905 };
6906 let mut __struct = Self::default();
6907 __struct.MMSI = buf.get_u32_le()?;
6908 __struct.lat = buf.get_i32_le()?;
6909 __struct.lon = buf.get_i32_le()?;
6910 __struct.COG = buf.get_u16_le()?;
6911 __struct.heading = buf.get_u16_le()?;
6912 __struct.velocity = buf.get_u16_le()?;
6913 __struct.dimension_bow = buf.get_u16_le()?;
6914 __struct.dimension_stern = buf.get_u16_le()?;
6915 __struct.tslc = buf.get_u16_le()?;
6916 let tmp = buf.get_u16_le()?;
6917 __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
6918 ::mavlink_core::error::ParserError::InvalidFlag {
6919 flag_type: "AisFlags",
6920 value: tmp as u64,
6921 },
6922 )?;
6923 __struct.turn_rate = buf.get_i8()?;
6924 let tmp = buf.get_u8()?;
6925 __struct.navigational_status =
6926 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6927 enum_type: "AisNavStatus",
6928 value: tmp as u64,
6929 })?;
6930 let tmp = buf.get_u8()?;
6931 __struct.mavtype =
6932 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6933 enum_type: "AisType",
6934 value: tmp as u64,
6935 })?;
6936 __struct.dimension_port = buf.get_u8()?;
6937 __struct.dimension_starboard = buf.get_u8()?;
6938 let mut tmp = [0_u8; 7usize];
6939 for v in &mut tmp {
6940 *v = buf.get_u8()?;
6941 }
6942 __struct.callsign = CharArray::new(tmp);
6943 let mut tmp = [0_u8; 20usize];
6944 for v in &mut tmp {
6945 *v = buf.get_u8()?;
6946 }
6947 __struct.name = CharArray::new(tmp);
6948 Ok(__struct)
6949 }
6950 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6951 let mut __tmp = BytesMut::new(bytes);
6952 #[allow(clippy::absurd_extreme_comparisons)]
6953 #[allow(unused_comparisons)]
6954 if __tmp.remaining() < Self::ENCODED_LEN {
6955 panic!(
6956 "buffer is too small (need {} bytes, but got {})",
6957 Self::ENCODED_LEN,
6958 __tmp.remaining(),
6959 )
6960 }
6961 __tmp.put_u32_le(self.MMSI);
6962 __tmp.put_i32_le(self.lat);
6963 __tmp.put_i32_le(self.lon);
6964 __tmp.put_u16_le(self.COG);
6965 __tmp.put_u16_le(self.heading);
6966 __tmp.put_u16_le(self.velocity);
6967 __tmp.put_u16_le(self.dimension_bow);
6968 __tmp.put_u16_le(self.dimension_stern);
6969 __tmp.put_u16_le(self.tslc);
6970 __tmp.put_u16_le(self.flags.bits() as u16);
6971 __tmp.put_i8(self.turn_rate);
6972 __tmp.put_u8(self.navigational_status as u8);
6973 __tmp.put_u8(self.mavtype as u8);
6974 __tmp.put_u8(self.dimension_port);
6975 __tmp.put_u8(self.dimension_starboard);
6976 for val in &self.callsign {
6977 __tmp.put_u8(*val);
6978 }
6979 for val in &self.name {
6980 __tmp.put_u8(*val);
6981 }
6982 if matches!(version, MavlinkVersion::V2) {
6983 let len = __tmp.len();
6984 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6985 } else {
6986 __tmp.len()
6987 }
6988 }
6989}
6990#[doc = "The current system altitude."]
6991#[doc = ""]
6992#[doc = "ID: 141"]
6993#[derive(Debug, Clone, PartialEq)]
6994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6996#[cfg_attr(feature = "ts", derive(TS))]
6997#[cfg_attr(feature = "ts", ts(export))]
6998pub struct ALTITUDE_DATA {
6999 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7000 pub time_usec: u64,
7001 #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
7002 pub altitude_monotonic: f32,
7003 #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
7004 pub altitude_amsl: f32,
7005 #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
7006 pub altitude_local: f32,
7007 #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
7008 pub altitude_relative: f32,
7009 #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
7010 pub altitude_terrain: f32,
7011 #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
7012 pub bottom_clearance: f32,
7013}
7014impl ALTITUDE_DATA {
7015 pub const ENCODED_LEN: usize = 32usize;
7016 pub const DEFAULT: Self = Self {
7017 time_usec: 0_u64,
7018 altitude_monotonic: 0.0_f32,
7019 altitude_amsl: 0.0_f32,
7020 altitude_local: 0.0_f32,
7021 altitude_relative: 0.0_f32,
7022 altitude_terrain: 0.0_f32,
7023 bottom_clearance: 0.0_f32,
7024 };
7025 #[cfg(feature = "arbitrary")]
7026 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7027 use arbitrary::{Arbitrary, Unstructured};
7028 let mut buf = [0u8; 1024];
7029 rng.fill_bytes(&mut buf);
7030 let mut unstructured = Unstructured::new(&buf);
7031 Self::arbitrary(&mut unstructured).unwrap_or_default()
7032 }
7033}
7034impl Default for ALTITUDE_DATA {
7035 fn default() -> Self {
7036 Self::DEFAULT.clone()
7037 }
7038}
7039impl MessageData for ALTITUDE_DATA {
7040 type Message = MavMessage;
7041 const ID: u32 = 141u32;
7042 const NAME: &'static str = "ALTITUDE";
7043 const EXTRA_CRC: u8 = 47u8;
7044 const ENCODED_LEN: usize = 32usize;
7045 fn deser(
7046 _version: MavlinkVersion,
7047 __input: &[u8],
7048 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7049 let avail_len = __input.len();
7050 let mut payload_buf = [0; Self::ENCODED_LEN];
7051 let mut buf = if avail_len < Self::ENCODED_LEN {
7052 payload_buf[0..avail_len].copy_from_slice(__input);
7053 Bytes::new(&payload_buf)
7054 } else {
7055 Bytes::new(__input)
7056 };
7057 let mut __struct = Self::default();
7058 __struct.time_usec = buf.get_u64_le()?;
7059 __struct.altitude_monotonic = buf.get_f32_le()?;
7060 __struct.altitude_amsl = buf.get_f32_le()?;
7061 __struct.altitude_local = buf.get_f32_le()?;
7062 __struct.altitude_relative = buf.get_f32_le()?;
7063 __struct.altitude_terrain = buf.get_f32_le()?;
7064 __struct.bottom_clearance = buf.get_f32_le()?;
7065 Ok(__struct)
7066 }
7067 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7068 let mut __tmp = BytesMut::new(bytes);
7069 #[allow(clippy::absurd_extreme_comparisons)]
7070 #[allow(unused_comparisons)]
7071 if __tmp.remaining() < Self::ENCODED_LEN {
7072 panic!(
7073 "buffer is too small (need {} bytes, but got {})",
7074 Self::ENCODED_LEN,
7075 __tmp.remaining(),
7076 )
7077 }
7078 __tmp.put_u64_le(self.time_usec);
7079 __tmp.put_f32_le(self.altitude_monotonic);
7080 __tmp.put_f32_le(self.altitude_amsl);
7081 __tmp.put_f32_le(self.altitude_local);
7082 __tmp.put_f32_le(self.altitude_relative);
7083 __tmp.put_f32_le(self.altitude_terrain);
7084 __tmp.put_f32_le(self.bottom_clearance);
7085 if matches!(version, MavlinkVersion::V2) {
7086 let len = __tmp.len();
7087 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7088 } else {
7089 __tmp.len()
7090 }
7091 }
7092}
7093#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
7094#[doc = ""]
7095#[doc = "ID: 30"]
7096#[derive(Debug, Clone, PartialEq)]
7097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7099#[cfg_attr(feature = "ts", derive(TS))]
7100#[cfg_attr(feature = "ts", ts(export))]
7101pub struct ATTITUDE_DATA {
7102 #[doc = "Timestamp (time since system boot)."]
7103 pub time_boot_ms: u32,
7104 #[doc = "Roll angle (-pi..+pi)"]
7105 pub roll: f32,
7106 #[doc = "Pitch angle (-pi..+pi)"]
7107 pub pitch: f32,
7108 #[doc = "Yaw angle (-pi..+pi)"]
7109 pub yaw: f32,
7110 #[doc = "Roll angular speed"]
7111 pub rollspeed: f32,
7112 #[doc = "Pitch angular speed"]
7113 pub pitchspeed: f32,
7114 #[doc = "Yaw angular speed"]
7115 pub yawspeed: f32,
7116}
7117impl ATTITUDE_DATA {
7118 pub const ENCODED_LEN: usize = 28usize;
7119 pub const DEFAULT: Self = Self {
7120 time_boot_ms: 0_u32,
7121 roll: 0.0_f32,
7122 pitch: 0.0_f32,
7123 yaw: 0.0_f32,
7124 rollspeed: 0.0_f32,
7125 pitchspeed: 0.0_f32,
7126 yawspeed: 0.0_f32,
7127 };
7128 #[cfg(feature = "arbitrary")]
7129 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7130 use arbitrary::{Arbitrary, Unstructured};
7131 let mut buf = [0u8; 1024];
7132 rng.fill_bytes(&mut buf);
7133 let mut unstructured = Unstructured::new(&buf);
7134 Self::arbitrary(&mut unstructured).unwrap_or_default()
7135 }
7136}
7137impl Default for ATTITUDE_DATA {
7138 fn default() -> Self {
7139 Self::DEFAULT.clone()
7140 }
7141}
7142impl MessageData for ATTITUDE_DATA {
7143 type Message = MavMessage;
7144 const ID: u32 = 30u32;
7145 const NAME: &'static str = "ATTITUDE";
7146 const EXTRA_CRC: u8 = 39u8;
7147 const ENCODED_LEN: usize = 28usize;
7148 fn deser(
7149 _version: MavlinkVersion,
7150 __input: &[u8],
7151 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7152 let avail_len = __input.len();
7153 let mut payload_buf = [0; Self::ENCODED_LEN];
7154 let mut buf = if avail_len < Self::ENCODED_LEN {
7155 payload_buf[0..avail_len].copy_from_slice(__input);
7156 Bytes::new(&payload_buf)
7157 } else {
7158 Bytes::new(__input)
7159 };
7160 let mut __struct = Self::default();
7161 __struct.time_boot_ms = buf.get_u32_le()?;
7162 __struct.roll = buf.get_f32_le()?;
7163 __struct.pitch = buf.get_f32_le()?;
7164 __struct.yaw = buf.get_f32_le()?;
7165 __struct.rollspeed = buf.get_f32_le()?;
7166 __struct.pitchspeed = buf.get_f32_le()?;
7167 __struct.yawspeed = buf.get_f32_le()?;
7168 Ok(__struct)
7169 }
7170 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7171 let mut __tmp = BytesMut::new(bytes);
7172 #[allow(clippy::absurd_extreme_comparisons)]
7173 #[allow(unused_comparisons)]
7174 if __tmp.remaining() < Self::ENCODED_LEN {
7175 panic!(
7176 "buffer is too small (need {} bytes, but got {})",
7177 Self::ENCODED_LEN,
7178 __tmp.remaining(),
7179 )
7180 }
7181 __tmp.put_u32_le(self.time_boot_ms);
7182 __tmp.put_f32_le(self.roll);
7183 __tmp.put_f32_le(self.pitch);
7184 __tmp.put_f32_le(self.yaw);
7185 __tmp.put_f32_le(self.rollspeed);
7186 __tmp.put_f32_le(self.pitchspeed);
7187 __tmp.put_f32_le(self.yawspeed);
7188 if matches!(version, MavlinkVersion::V2) {
7189 let len = __tmp.len();
7190 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7191 } else {
7192 __tmp.len()
7193 }
7194 }
7195}
7196#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
7197#[doc = ""]
7198#[doc = "ID: 31"]
7199#[derive(Debug, Clone, PartialEq)]
7200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7202#[cfg_attr(feature = "ts", derive(TS))]
7203#[cfg_attr(feature = "ts", ts(export))]
7204pub struct ATTITUDE_QUATERNION_DATA {
7205 #[doc = "Timestamp (time since system boot)."]
7206 pub time_boot_ms: u32,
7207 #[doc = "Quaternion component 1, w (1 in null-rotation)"]
7208 pub q1: f32,
7209 #[doc = "Quaternion component 2, x (0 in null-rotation)"]
7210 pub q2: f32,
7211 #[doc = "Quaternion component 3, y (0 in null-rotation)"]
7212 pub q3: f32,
7213 #[doc = "Quaternion component 4, z (0 in null-rotation)"]
7214 pub q4: f32,
7215 #[doc = "Roll angular speed"]
7216 pub rollspeed: f32,
7217 #[doc = "Pitch angular speed"]
7218 pub pitchspeed: f32,
7219 #[doc = "Yaw angular speed"]
7220 pub yawspeed: f32,
7221 #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
7222 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7223 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7224 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7225 pub repr_offset_q: [f32; 4],
7226}
7227impl ATTITUDE_QUATERNION_DATA {
7228 pub const ENCODED_LEN: usize = 48usize;
7229 pub const DEFAULT: Self = Self {
7230 time_boot_ms: 0_u32,
7231 q1: 0.0_f32,
7232 q2: 0.0_f32,
7233 q3: 0.0_f32,
7234 q4: 0.0_f32,
7235 rollspeed: 0.0_f32,
7236 pitchspeed: 0.0_f32,
7237 yawspeed: 0.0_f32,
7238 repr_offset_q: [0.0_f32; 4usize],
7239 };
7240 #[cfg(feature = "arbitrary")]
7241 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7242 use arbitrary::{Arbitrary, Unstructured};
7243 let mut buf = [0u8; 1024];
7244 rng.fill_bytes(&mut buf);
7245 let mut unstructured = Unstructured::new(&buf);
7246 Self::arbitrary(&mut unstructured).unwrap_or_default()
7247 }
7248}
7249impl Default for ATTITUDE_QUATERNION_DATA {
7250 fn default() -> Self {
7251 Self::DEFAULT.clone()
7252 }
7253}
7254impl MessageData for ATTITUDE_QUATERNION_DATA {
7255 type Message = MavMessage;
7256 const ID: u32 = 31u32;
7257 const NAME: &'static str = "ATTITUDE_QUATERNION";
7258 const EXTRA_CRC: u8 = 246u8;
7259 const ENCODED_LEN: usize = 48usize;
7260 fn deser(
7261 _version: MavlinkVersion,
7262 __input: &[u8],
7263 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7264 let avail_len = __input.len();
7265 let mut payload_buf = [0; Self::ENCODED_LEN];
7266 let mut buf = if avail_len < Self::ENCODED_LEN {
7267 payload_buf[0..avail_len].copy_from_slice(__input);
7268 Bytes::new(&payload_buf)
7269 } else {
7270 Bytes::new(__input)
7271 };
7272 let mut __struct = Self::default();
7273 __struct.time_boot_ms = buf.get_u32_le()?;
7274 __struct.q1 = buf.get_f32_le()?;
7275 __struct.q2 = buf.get_f32_le()?;
7276 __struct.q3 = buf.get_f32_le()?;
7277 __struct.q4 = buf.get_f32_le()?;
7278 __struct.rollspeed = buf.get_f32_le()?;
7279 __struct.pitchspeed = buf.get_f32_le()?;
7280 __struct.yawspeed = buf.get_f32_le()?;
7281 for v in &mut __struct.repr_offset_q {
7282 let val = buf.get_f32_le()?;
7283 *v = val;
7284 }
7285 Ok(__struct)
7286 }
7287 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7288 let mut __tmp = BytesMut::new(bytes);
7289 #[allow(clippy::absurd_extreme_comparisons)]
7290 #[allow(unused_comparisons)]
7291 if __tmp.remaining() < Self::ENCODED_LEN {
7292 panic!(
7293 "buffer is too small (need {} bytes, but got {})",
7294 Self::ENCODED_LEN,
7295 __tmp.remaining(),
7296 )
7297 }
7298 __tmp.put_u32_le(self.time_boot_ms);
7299 __tmp.put_f32_le(self.q1);
7300 __tmp.put_f32_le(self.q2);
7301 __tmp.put_f32_le(self.q3);
7302 __tmp.put_f32_le(self.q4);
7303 __tmp.put_f32_le(self.rollspeed);
7304 __tmp.put_f32_le(self.pitchspeed);
7305 __tmp.put_f32_le(self.yawspeed);
7306 if matches!(version, MavlinkVersion::V2) {
7307 for val in &self.repr_offset_q {
7308 __tmp.put_f32_le(*val);
7309 }
7310 let len = __tmp.len();
7311 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7312 } else {
7313 __tmp.len()
7314 }
7315 }
7316}
7317#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
7318#[doc = ""]
7319#[doc = "ID: 61"]
7320#[derive(Debug, Clone, PartialEq)]
7321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7323#[cfg_attr(feature = "ts", derive(TS))]
7324#[cfg_attr(feature = "ts", ts(export))]
7325pub struct ATTITUDE_QUATERNION_COV_DATA {
7326 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7327 pub time_usec: u64,
7328 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
7329 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7330 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7331 pub q: [f32; 4],
7332 #[doc = "Roll angular speed"]
7333 pub rollspeed: f32,
7334 #[doc = "Pitch angular speed"]
7335 pub pitchspeed: f32,
7336 #[doc = "Yaw angular speed"]
7337 pub yawspeed: f32,
7338 #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
7339 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7340 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7341 pub covariance: [f32; 9],
7342}
7343impl ATTITUDE_QUATERNION_COV_DATA {
7344 pub const ENCODED_LEN: usize = 72usize;
7345 pub const DEFAULT: Self = Self {
7346 time_usec: 0_u64,
7347 q: [0.0_f32; 4usize],
7348 rollspeed: 0.0_f32,
7349 pitchspeed: 0.0_f32,
7350 yawspeed: 0.0_f32,
7351 covariance: [0.0_f32; 9usize],
7352 };
7353 #[cfg(feature = "arbitrary")]
7354 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7355 use arbitrary::{Arbitrary, Unstructured};
7356 let mut buf = [0u8; 1024];
7357 rng.fill_bytes(&mut buf);
7358 let mut unstructured = Unstructured::new(&buf);
7359 Self::arbitrary(&mut unstructured).unwrap_or_default()
7360 }
7361}
7362impl Default for ATTITUDE_QUATERNION_COV_DATA {
7363 fn default() -> Self {
7364 Self::DEFAULT.clone()
7365 }
7366}
7367impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
7368 type Message = MavMessage;
7369 const ID: u32 = 61u32;
7370 const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
7371 const EXTRA_CRC: u8 = 167u8;
7372 const ENCODED_LEN: usize = 72usize;
7373 fn deser(
7374 _version: MavlinkVersion,
7375 __input: &[u8],
7376 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7377 let avail_len = __input.len();
7378 let mut payload_buf = [0; Self::ENCODED_LEN];
7379 let mut buf = if avail_len < Self::ENCODED_LEN {
7380 payload_buf[0..avail_len].copy_from_slice(__input);
7381 Bytes::new(&payload_buf)
7382 } else {
7383 Bytes::new(__input)
7384 };
7385 let mut __struct = Self::default();
7386 __struct.time_usec = buf.get_u64_le()?;
7387 for v in &mut __struct.q {
7388 let val = buf.get_f32_le()?;
7389 *v = val;
7390 }
7391 __struct.rollspeed = buf.get_f32_le()?;
7392 __struct.pitchspeed = buf.get_f32_le()?;
7393 __struct.yawspeed = buf.get_f32_le()?;
7394 for v in &mut __struct.covariance {
7395 let val = buf.get_f32_le()?;
7396 *v = val;
7397 }
7398 Ok(__struct)
7399 }
7400 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7401 let mut __tmp = BytesMut::new(bytes);
7402 #[allow(clippy::absurd_extreme_comparisons)]
7403 #[allow(unused_comparisons)]
7404 if __tmp.remaining() < Self::ENCODED_LEN {
7405 panic!(
7406 "buffer is too small (need {} bytes, but got {})",
7407 Self::ENCODED_LEN,
7408 __tmp.remaining(),
7409 )
7410 }
7411 __tmp.put_u64_le(self.time_usec);
7412 for val in &self.q {
7413 __tmp.put_f32_le(*val);
7414 }
7415 __tmp.put_f32_le(self.rollspeed);
7416 __tmp.put_f32_le(self.pitchspeed);
7417 __tmp.put_f32_le(self.yawspeed);
7418 for val in &self.covariance {
7419 __tmp.put_f32_le(*val);
7420 }
7421 if matches!(version, MavlinkVersion::V2) {
7422 let len = __tmp.len();
7423 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7424 } else {
7425 __tmp.len()
7426 }
7427 }
7428}
7429#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
7430#[doc = ""]
7431#[doc = "ID: 83"]
7432#[derive(Debug, Clone, PartialEq)]
7433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7435#[cfg_attr(feature = "ts", derive(TS))]
7436#[cfg_attr(feature = "ts", ts(export))]
7437pub struct ATTITUDE_TARGET_DATA {
7438 #[doc = "Timestamp (time since system boot)."]
7439 pub time_boot_ms: u32,
7440 #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7441 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7442 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7443 pub q: [f32; 4],
7444 #[doc = "Body roll rate"]
7445 pub body_roll_rate: f32,
7446 #[doc = "Body pitch rate"]
7447 pub body_pitch_rate: f32,
7448 #[doc = "Body yaw rate"]
7449 pub body_yaw_rate: f32,
7450 #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
7451 pub thrust: f32,
7452 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
7453 pub type_mask: AttitudeTargetTypemask,
7454}
7455impl ATTITUDE_TARGET_DATA {
7456 pub const ENCODED_LEN: usize = 37usize;
7457 pub const DEFAULT: Self = Self {
7458 time_boot_ms: 0_u32,
7459 q: [0.0_f32; 4usize],
7460 body_roll_rate: 0.0_f32,
7461 body_pitch_rate: 0.0_f32,
7462 body_yaw_rate: 0.0_f32,
7463 thrust: 0.0_f32,
7464 type_mask: AttitudeTargetTypemask::DEFAULT,
7465 };
7466 #[cfg(feature = "arbitrary")]
7467 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7468 use arbitrary::{Arbitrary, Unstructured};
7469 let mut buf = [0u8; 1024];
7470 rng.fill_bytes(&mut buf);
7471 let mut unstructured = Unstructured::new(&buf);
7472 Self::arbitrary(&mut unstructured).unwrap_or_default()
7473 }
7474}
7475impl Default for ATTITUDE_TARGET_DATA {
7476 fn default() -> Self {
7477 Self::DEFAULT.clone()
7478 }
7479}
7480impl MessageData for ATTITUDE_TARGET_DATA {
7481 type Message = MavMessage;
7482 const ID: u32 = 83u32;
7483 const NAME: &'static str = "ATTITUDE_TARGET";
7484 const EXTRA_CRC: u8 = 22u8;
7485 const ENCODED_LEN: usize = 37usize;
7486 fn deser(
7487 _version: MavlinkVersion,
7488 __input: &[u8],
7489 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7490 let avail_len = __input.len();
7491 let mut payload_buf = [0; Self::ENCODED_LEN];
7492 let mut buf = if avail_len < Self::ENCODED_LEN {
7493 payload_buf[0..avail_len].copy_from_slice(__input);
7494 Bytes::new(&payload_buf)
7495 } else {
7496 Bytes::new(__input)
7497 };
7498 let mut __struct = Self::default();
7499 __struct.time_boot_ms = buf.get_u32_le()?;
7500 for v in &mut __struct.q {
7501 let val = buf.get_f32_le()?;
7502 *v = val;
7503 }
7504 __struct.body_roll_rate = buf.get_f32_le()?;
7505 __struct.body_pitch_rate = buf.get_f32_le()?;
7506 __struct.body_yaw_rate = buf.get_f32_le()?;
7507 __struct.thrust = buf.get_f32_le()?;
7508 let tmp = buf.get_u8()?;
7509 __struct.type_mask =
7510 AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
7511 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7512 flag_type: "AttitudeTargetTypemask",
7513 value: tmp as u64,
7514 })?;
7515 Ok(__struct)
7516 }
7517 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7518 let mut __tmp = BytesMut::new(bytes);
7519 #[allow(clippy::absurd_extreme_comparisons)]
7520 #[allow(unused_comparisons)]
7521 if __tmp.remaining() < Self::ENCODED_LEN {
7522 panic!(
7523 "buffer is too small (need {} bytes, but got {})",
7524 Self::ENCODED_LEN,
7525 __tmp.remaining(),
7526 )
7527 }
7528 __tmp.put_u32_le(self.time_boot_ms);
7529 for val in &self.q {
7530 __tmp.put_f32_le(*val);
7531 }
7532 __tmp.put_f32_le(self.body_roll_rate);
7533 __tmp.put_f32_le(self.body_pitch_rate);
7534 __tmp.put_f32_le(self.body_yaw_rate);
7535 __tmp.put_f32_le(self.thrust);
7536 __tmp.put_u8(self.type_mask.bits() as u8);
7537 if matches!(version, MavlinkVersion::V2) {
7538 let len = __tmp.len();
7539 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7540 } else {
7541 __tmp.len()
7542 }
7543 }
7544}
7545#[doc = "Motion capture attitude and position."]
7546#[doc = ""]
7547#[doc = "ID: 138"]
7548#[derive(Debug, Clone, PartialEq)]
7549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7551#[cfg_attr(feature = "ts", derive(TS))]
7552#[cfg_attr(feature = "ts", ts(export))]
7553pub struct ATT_POS_MOCAP_DATA {
7554 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7555 pub time_usec: u64,
7556 #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7557 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7558 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7559 pub q: [f32; 4],
7560 #[doc = "X position (NED)"]
7561 pub x: f32,
7562 #[doc = "Y position (NED)"]
7563 pub y: f32,
7564 #[doc = "Z position (NED)"]
7565 pub z: f32,
7566 #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
7567 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7568 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7569 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7570 pub covariance: [f32; 21],
7571}
7572impl ATT_POS_MOCAP_DATA {
7573 pub const ENCODED_LEN: usize = 120usize;
7574 pub const DEFAULT: Self = Self {
7575 time_usec: 0_u64,
7576 q: [0.0_f32; 4usize],
7577 x: 0.0_f32,
7578 y: 0.0_f32,
7579 z: 0.0_f32,
7580 covariance: [0.0_f32; 21usize],
7581 };
7582 #[cfg(feature = "arbitrary")]
7583 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7584 use arbitrary::{Arbitrary, Unstructured};
7585 let mut buf = [0u8; 1024];
7586 rng.fill_bytes(&mut buf);
7587 let mut unstructured = Unstructured::new(&buf);
7588 Self::arbitrary(&mut unstructured).unwrap_or_default()
7589 }
7590}
7591impl Default for ATT_POS_MOCAP_DATA {
7592 fn default() -> Self {
7593 Self::DEFAULT.clone()
7594 }
7595}
7596impl MessageData for ATT_POS_MOCAP_DATA {
7597 type Message = MavMessage;
7598 const ID: u32 = 138u32;
7599 const NAME: &'static str = "ATT_POS_MOCAP";
7600 const EXTRA_CRC: u8 = 109u8;
7601 const ENCODED_LEN: usize = 120usize;
7602 fn deser(
7603 _version: MavlinkVersion,
7604 __input: &[u8],
7605 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7606 let avail_len = __input.len();
7607 let mut payload_buf = [0; Self::ENCODED_LEN];
7608 let mut buf = if avail_len < Self::ENCODED_LEN {
7609 payload_buf[0..avail_len].copy_from_slice(__input);
7610 Bytes::new(&payload_buf)
7611 } else {
7612 Bytes::new(__input)
7613 };
7614 let mut __struct = Self::default();
7615 __struct.time_usec = buf.get_u64_le()?;
7616 for v in &mut __struct.q {
7617 let val = buf.get_f32_le()?;
7618 *v = val;
7619 }
7620 __struct.x = buf.get_f32_le()?;
7621 __struct.y = buf.get_f32_le()?;
7622 __struct.z = buf.get_f32_le()?;
7623 for v in &mut __struct.covariance {
7624 let val = buf.get_f32_le()?;
7625 *v = val;
7626 }
7627 Ok(__struct)
7628 }
7629 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7630 let mut __tmp = BytesMut::new(bytes);
7631 #[allow(clippy::absurd_extreme_comparisons)]
7632 #[allow(unused_comparisons)]
7633 if __tmp.remaining() < Self::ENCODED_LEN {
7634 panic!(
7635 "buffer is too small (need {} bytes, but got {})",
7636 Self::ENCODED_LEN,
7637 __tmp.remaining(),
7638 )
7639 }
7640 __tmp.put_u64_le(self.time_usec);
7641 for val in &self.q {
7642 __tmp.put_f32_le(*val);
7643 }
7644 __tmp.put_f32_le(self.x);
7645 __tmp.put_f32_le(self.y);
7646 __tmp.put_f32_le(self.z);
7647 if matches!(version, MavlinkVersion::V2) {
7648 for val in &self.covariance {
7649 __tmp.put_f32_le(*val);
7650 }
7651 let len = __tmp.len();
7652 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7653 } else {
7654 __tmp.len()
7655 }
7656 }
7657}
7658#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
7659#[doc = ""]
7660#[doc = "ID: 7"]
7661#[derive(Debug, Clone, PartialEq)]
7662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7664#[cfg_attr(feature = "ts", derive(TS))]
7665#[cfg_attr(feature = "ts", ts(export))]
7666pub struct AUTH_KEY_DATA {
7667 #[doc = "key"]
7668 #[cfg_attr(feature = "ts", ts(type = "string"))]
7669 pub key: CharArray<32>,
7670}
7671impl AUTH_KEY_DATA {
7672 pub const ENCODED_LEN: usize = 32usize;
7673 pub const DEFAULT: Self = Self {
7674 key: CharArray::new([0_u8; 32usize]),
7675 };
7676 #[cfg(feature = "arbitrary")]
7677 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7678 use arbitrary::{Arbitrary, Unstructured};
7679 let mut buf = [0u8; 1024];
7680 rng.fill_bytes(&mut buf);
7681 let mut unstructured = Unstructured::new(&buf);
7682 Self::arbitrary(&mut unstructured).unwrap_or_default()
7683 }
7684}
7685impl Default for AUTH_KEY_DATA {
7686 fn default() -> Self {
7687 Self::DEFAULT.clone()
7688 }
7689}
7690impl MessageData for AUTH_KEY_DATA {
7691 type Message = MavMessage;
7692 const ID: u32 = 7u32;
7693 const NAME: &'static str = "AUTH_KEY";
7694 const EXTRA_CRC: u8 = 119u8;
7695 const ENCODED_LEN: usize = 32usize;
7696 fn deser(
7697 _version: MavlinkVersion,
7698 __input: &[u8],
7699 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7700 let avail_len = __input.len();
7701 let mut payload_buf = [0; Self::ENCODED_LEN];
7702 let mut buf = if avail_len < Self::ENCODED_LEN {
7703 payload_buf[0..avail_len].copy_from_slice(__input);
7704 Bytes::new(&payload_buf)
7705 } else {
7706 Bytes::new(__input)
7707 };
7708 let mut __struct = Self::default();
7709 let mut tmp = [0_u8; 32usize];
7710 for v in &mut tmp {
7711 *v = buf.get_u8()?;
7712 }
7713 __struct.key = CharArray::new(tmp);
7714 Ok(__struct)
7715 }
7716 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7717 let mut __tmp = BytesMut::new(bytes);
7718 #[allow(clippy::absurd_extreme_comparisons)]
7719 #[allow(unused_comparisons)]
7720 if __tmp.remaining() < Self::ENCODED_LEN {
7721 panic!(
7722 "buffer is too small (need {} bytes, but got {})",
7723 Self::ENCODED_LEN,
7724 __tmp.remaining(),
7725 )
7726 }
7727 for val in &self.key {
7728 __tmp.put_u8(*val);
7729 }
7730 if matches!(version, MavlinkVersion::V2) {
7731 let len = __tmp.len();
7732 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7733 } else {
7734 __tmp.len()
7735 }
7736 }
7737}
7738#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
7739#[doc = ""]
7740#[doc = "ID: 286"]
7741#[derive(Debug, Clone, PartialEq)]
7742#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7743#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7744#[cfg_attr(feature = "ts", derive(TS))]
7745#[cfg_attr(feature = "ts", ts(export))]
7746pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
7747 #[doc = "Timestamp (time since system boot)."]
7748 pub time_boot_us: u64,
7749 #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
7750 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7751 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7752 pub q: [f32; 4],
7753 #[doc = "Estimated delay of the attitude data. 0 if unknown."]
7754 pub q_estimated_delay_us: u32,
7755 #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
7756 pub vx: f32,
7757 #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
7758 pub vy: f32,
7759 #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
7760 pub vz: f32,
7761 #[doc = "Estimated delay of the speed data. 0 if unknown."]
7762 pub v_estimated_delay_us: u32,
7763 #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
7764 pub feed_forward_angular_velocity_z: f32,
7765 #[doc = "Bitmap indicating which estimator outputs are valid."]
7766 pub estimator_status: EstimatorStatusFlags,
7767 #[doc = "System ID"]
7768 pub target_system: u8,
7769 #[doc = "Component ID"]
7770 pub target_component: u8,
7771 #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
7772 pub landed_state: MavLandedState,
7773 #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
7774 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7775 pub angular_velocity_z: f32,
7776}
7777impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
7778 pub const ENCODED_LEN: usize = 57usize;
7779 pub const DEFAULT: Self = Self {
7780 time_boot_us: 0_u64,
7781 q: [0.0_f32; 4usize],
7782 q_estimated_delay_us: 0_u32,
7783 vx: 0.0_f32,
7784 vy: 0.0_f32,
7785 vz: 0.0_f32,
7786 v_estimated_delay_us: 0_u32,
7787 feed_forward_angular_velocity_z: 0.0_f32,
7788 estimator_status: EstimatorStatusFlags::DEFAULT,
7789 target_system: 0_u8,
7790 target_component: 0_u8,
7791 landed_state: MavLandedState::DEFAULT,
7792 angular_velocity_z: 0.0_f32,
7793 };
7794 #[cfg(feature = "arbitrary")]
7795 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7796 use arbitrary::{Arbitrary, Unstructured};
7797 let mut buf = [0u8; 1024];
7798 rng.fill_bytes(&mut buf);
7799 let mut unstructured = Unstructured::new(&buf);
7800 Self::arbitrary(&mut unstructured).unwrap_or_default()
7801 }
7802}
7803impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
7804 fn default() -> Self {
7805 Self::DEFAULT.clone()
7806 }
7807}
7808impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
7809 type Message = MavMessage;
7810 const ID: u32 = 286u32;
7811 const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
7812 const EXTRA_CRC: u8 = 210u8;
7813 const ENCODED_LEN: usize = 57usize;
7814 fn deser(
7815 _version: MavlinkVersion,
7816 __input: &[u8],
7817 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7818 let avail_len = __input.len();
7819 let mut payload_buf = [0; Self::ENCODED_LEN];
7820 let mut buf = if avail_len < Self::ENCODED_LEN {
7821 payload_buf[0..avail_len].copy_from_slice(__input);
7822 Bytes::new(&payload_buf)
7823 } else {
7824 Bytes::new(__input)
7825 };
7826 let mut __struct = Self::default();
7827 __struct.time_boot_us = buf.get_u64_le()?;
7828 for v in &mut __struct.q {
7829 let val = buf.get_f32_le()?;
7830 *v = val;
7831 }
7832 __struct.q_estimated_delay_us = buf.get_u32_le()?;
7833 __struct.vx = buf.get_f32_le()?;
7834 __struct.vy = buf.get_f32_le()?;
7835 __struct.vz = buf.get_f32_le()?;
7836 __struct.v_estimated_delay_us = buf.get_u32_le()?;
7837 __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
7838 let tmp = buf.get_u16_le()?;
7839 __struct.estimator_status = EstimatorStatusFlags::from_bits(
7840 tmp as <EstimatorStatusFlags as Flags>::Bits,
7841 )
7842 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7843 flag_type: "EstimatorStatusFlags",
7844 value: tmp as u64,
7845 })?;
7846 __struct.target_system = buf.get_u8()?;
7847 __struct.target_component = buf.get_u8()?;
7848 let tmp = buf.get_u8()?;
7849 __struct.landed_state =
7850 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7851 enum_type: "MavLandedState",
7852 value: tmp as u64,
7853 })?;
7854 __struct.angular_velocity_z = buf.get_f32_le()?;
7855 Ok(__struct)
7856 }
7857 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7858 let mut __tmp = BytesMut::new(bytes);
7859 #[allow(clippy::absurd_extreme_comparisons)]
7860 #[allow(unused_comparisons)]
7861 if __tmp.remaining() < Self::ENCODED_LEN {
7862 panic!(
7863 "buffer is too small (need {} bytes, but got {})",
7864 Self::ENCODED_LEN,
7865 __tmp.remaining(),
7866 )
7867 }
7868 __tmp.put_u64_le(self.time_boot_us);
7869 for val in &self.q {
7870 __tmp.put_f32_le(*val);
7871 }
7872 __tmp.put_u32_le(self.q_estimated_delay_us);
7873 __tmp.put_f32_le(self.vx);
7874 __tmp.put_f32_le(self.vy);
7875 __tmp.put_f32_le(self.vz);
7876 __tmp.put_u32_le(self.v_estimated_delay_us);
7877 __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
7878 __tmp.put_u16_le(self.estimator_status.bits() as u16);
7879 __tmp.put_u8(self.target_system);
7880 __tmp.put_u8(self.target_component);
7881 __tmp.put_u8(self.landed_state as u8);
7882 if matches!(version, MavlinkVersion::V2) {
7883 __tmp.put_f32_le(self.angular_velocity_z);
7884 let len = __tmp.len();
7885 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7886 } else {
7887 __tmp.len()
7888 }
7889 }
7890}
7891#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
7892#[doc = ""]
7893#[doc = "ID: 148"]
7894#[derive(Debug, Clone, PartialEq)]
7895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7897#[cfg_attr(feature = "ts", derive(TS))]
7898#[cfg_attr(feature = "ts", ts(export))]
7899pub struct AUTOPILOT_VERSION_DATA {
7900 #[doc = "Bitmap of capabilities"]
7901 pub capabilities: MavProtocolCapability,
7902 #[doc = "UID if provided by hardware (see uid2)"]
7903 pub uid: u64,
7904 #[doc = "Firmware version number. The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
7905 pub flight_sw_version: u32,
7906 #[doc = "Middleware version number"]
7907 pub middleware_sw_version: u32,
7908 #[doc = "Operating system version number"]
7909 pub os_sw_version: u32,
7910 #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
7911 pub board_version: u32,
7912 #[doc = "ID of the board vendor"]
7913 pub vendor_id: u16,
7914 #[doc = "ID of the product"]
7915 pub product_id: u16,
7916 #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
7917 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7918 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7919 pub flight_custom_version: [u8; 8],
7920 #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
7921 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7922 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7923 pub middleware_custom_version: [u8; 8],
7924 #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
7925 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7926 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7927 pub os_custom_version: [u8; 8],
7928 #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
7929 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7930 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7931 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7932 pub uid2: [u8; 18],
7933}
7934impl AUTOPILOT_VERSION_DATA {
7935 pub const ENCODED_LEN: usize = 78usize;
7936 pub const DEFAULT: Self = Self {
7937 capabilities: MavProtocolCapability::DEFAULT,
7938 uid: 0_u64,
7939 flight_sw_version: 0_u32,
7940 middleware_sw_version: 0_u32,
7941 os_sw_version: 0_u32,
7942 board_version: 0_u32,
7943 vendor_id: 0_u16,
7944 product_id: 0_u16,
7945 flight_custom_version: [0_u8; 8usize],
7946 middleware_custom_version: [0_u8; 8usize],
7947 os_custom_version: [0_u8; 8usize],
7948 uid2: [0_u8; 18usize],
7949 };
7950 #[cfg(feature = "arbitrary")]
7951 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7952 use arbitrary::{Arbitrary, Unstructured};
7953 let mut buf = [0u8; 1024];
7954 rng.fill_bytes(&mut buf);
7955 let mut unstructured = Unstructured::new(&buf);
7956 Self::arbitrary(&mut unstructured).unwrap_or_default()
7957 }
7958}
7959impl Default for AUTOPILOT_VERSION_DATA {
7960 fn default() -> Self {
7961 Self::DEFAULT.clone()
7962 }
7963}
7964impl MessageData for AUTOPILOT_VERSION_DATA {
7965 type Message = MavMessage;
7966 const ID: u32 = 148u32;
7967 const NAME: &'static str = "AUTOPILOT_VERSION";
7968 const EXTRA_CRC: u8 = 178u8;
7969 const ENCODED_LEN: usize = 78usize;
7970 fn deser(
7971 _version: MavlinkVersion,
7972 __input: &[u8],
7973 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7974 let avail_len = __input.len();
7975 let mut payload_buf = [0; Self::ENCODED_LEN];
7976 let mut buf = if avail_len < Self::ENCODED_LEN {
7977 payload_buf[0..avail_len].copy_from_slice(__input);
7978 Bytes::new(&payload_buf)
7979 } else {
7980 Bytes::new(__input)
7981 };
7982 let mut __struct = Self::default();
7983 let tmp = buf.get_u64_le()?;
7984 __struct.capabilities = MavProtocolCapability::from_bits(
7985 tmp as <MavProtocolCapability as Flags>::Bits,
7986 )
7987 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7988 flag_type: "MavProtocolCapability",
7989 value: tmp as u64,
7990 })?;
7991 __struct.uid = buf.get_u64_le()?;
7992 __struct.flight_sw_version = buf.get_u32_le()?;
7993 __struct.middleware_sw_version = buf.get_u32_le()?;
7994 __struct.os_sw_version = buf.get_u32_le()?;
7995 __struct.board_version = buf.get_u32_le()?;
7996 __struct.vendor_id = buf.get_u16_le()?;
7997 __struct.product_id = buf.get_u16_le()?;
7998 for v in &mut __struct.flight_custom_version {
7999 let val = buf.get_u8()?;
8000 *v = val;
8001 }
8002 for v in &mut __struct.middleware_custom_version {
8003 let val = buf.get_u8()?;
8004 *v = val;
8005 }
8006 for v in &mut __struct.os_custom_version {
8007 let val = buf.get_u8()?;
8008 *v = val;
8009 }
8010 for v in &mut __struct.uid2 {
8011 let val = buf.get_u8()?;
8012 *v = val;
8013 }
8014 Ok(__struct)
8015 }
8016 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8017 let mut __tmp = BytesMut::new(bytes);
8018 #[allow(clippy::absurd_extreme_comparisons)]
8019 #[allow(unused_comparisons)]
8020 if __tmp.remaining() < Self::ENCODED_LEN {
8021 panic!(
8022 "buffer is too small (need {} bytes, but got {})",
8023 Self::ENCODED_LEN,
8024 __tmp.remaining(),
8025 )
8026 }
8027 __tmp.put_u64_le(self.capabilities.bits() as u64);
8028 __tmp.put_u64_le(self.uid);
8029 __tmp.put_u32_le(self.flight_sw_version);
8030 __tmp.put_u32_le(self.middleware_sw_version);
8031 __tmp.put_u32_le(self.os_sw_version);
8032 __tmp.put_u32_le(self.board_version);
8033 __tmp.put_u16_le(self.vendor_id);
8034 __tmp.put_u16_le(self.product_id);
8035 for val in &self.flight_custom_version {
8036 __tmp.put_u8(*val);
8037 }
8038 for val in &self.middleware_custom_version {
8039 __tmp.put_u8(*val);
8040 }
8041 for val in &self.os_custom_version {
8042 __tmp.put_u8(*val);
8043 }
8044 if matches!(version, MavlinkVersion::V2) {
8045 for val in &self.uid2 {
8046 __tmp.put_u8(*val);
8047 }
8048 let len = __tmp.len();
8049 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8050 } else {
8051 __tmp.len()
8052 }
8053 }
8054}
8055#[doc = "Information about a flight mode. The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE. Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode. The modes must be available/settable for the current vehicle/frame type. Each mode should only be emitted once (even if it is both standard and custom). Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed. See <https://mavlink.io/en/services/standard_modes.html>."]
8056#[doc = ""]
8057#[doc = "ID: 435"]
8058#[derive(Debug, Clone, PartialEq)]
8059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8061#[cfg_attr(feature = "ts", derive(TS))]
8062#[cfg_attr(feature = "ts", ts(export))]
8063pub struct AVAILABLE_MODES_DATA {
8064 #[doc = "A bitfield for use for autopilot-specific flags"]
8065 pub custom_mode: u32,
8066 #[doc = "Mode properties."]
8067 pub properties: MavModeProperty,
8068 #[doc = "The total number of available modes for the current vehicle type."]
8069 pub number_modes: u8,
8070 #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
8071 pub mode_index: u8,
8072 #[doc = "Standard mode."]
8073 pub standard_mode: MavStandardMode,
8074 #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
8075 #[cfg_attr(feature = "ts", ts(type = "string"))]
8076 pub mode_name: CharArray<35>,
8077}
8078impl AVAILABLE_MODES_DATA {
8079 pub const ENCODED_LEN: usize = 46usize;
8080 pub const DEFAULT: Self = Self {
8081 custom_mode: 0_u32,
8082 properties: MavModeProperty::DEFAULT,
8083 number_modes: 0_u8,
8084 mode_index: 0_u8,
8085 standard_mode: MavStandardMode::DEFAULT,
8086 mode_name: CharArray::new([0_u8; 35usize]),
8087 };
8088 #[cfg(feature = "arbitrary")]
8089 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8090 use arbitrary::{Arbitrary, Unstructured};
8091 let mut buf = [0u8; 1024];
8092 rng.fill_bytes(&mut buf);
8093 let mut unstructured = Unstructured::new(&buf);
8094 Self::arbitrary(&mut unstructured).unwrap_or_default()
8095 }
8096}
8097impl Default for AVAILABLE_MODES_DATA {
8098 fn default() -> Self {
8099 Self::DEFAULT.clone()
8100 }
8101}
8102impl MessageData for AVAILABLE_MODES_DATA {
8103 type Message = MavMessage;
8104 const ID: u32 = 435u32;
8105 const NAME: &'static str = "AVAILABLE_MODES";
8106 const EXTRA_CRC: u8 = 134u8;
8107 const ENCODED_LEN: usize = 46usize;
8108 fn deser(
8109 _version: MavlinkVersion,
8110 __input: &[u8],
8111 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8112 let avail_len = __input.len();
8113 let mut payload_buf = [0; Self::ENCODED_LEN];
8114 let mut buf = if avail_len < Self::ENCODED_LEN {
8115 payload_buf[0..avail_len].copy_from_slice(__input);
8116 Bytes::new(&payload_buf)
8117 } else {
8118 Bytes::new(__input)
8119 };
8120 let mut __struct = Self::default();
8121 __struct.custom_mode = buf.get_u32_le()?;
8122 let tmp = buf.get_u32_le()?;
8123 __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
8124 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8125 flag_type: "MavModeProperty",
8126 value: tmp as u64,
8127 })?;
8128 __struct.number_modes = buf.get_u8()?;
8129 __struct.mode_index = buf.get_u8()?;
8130 let tmp = buf.get_u8()?;
8131 __struct.standard_mode =
8132 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8133 enum_type: "MavStandardMode",
8134 value: tmp as u64,
8135 })?;
8136 let mut tmp = [0_u8; 35usize];
8137 for v in &mut tmp {
8138 *v = buf.get_u8()?;
8139 }
8140 __struct.mode_name = CharArray::new(tmp);
8141 Ok(__struct)
8142 }
8143 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8144 let mut __tmp = BytesMut::new(bytes);
8145 #[allow(clippy::absurd_extreme_comparisons)]
8146 #[allow(unused_comparisons)]
8147 if __tmp.remaining() < Self::ENCODED_LEN {
8148 panic!(
8149 "buffer is too small (need {} bytes, but got {})",
8150 Self::ENCODED_LEN,
8151 __tmp.remaining(),
8152 )
8153 }
8154 __tmp.put_u32_le(self.custom_mode);
8155 __tmp.put_u32_le(self.properties.bits() as u32);
8156 __tmp.put_u8(self.number_modes);
8157 __tmp.put_u8(self.mode_index);
8158 __tmp.put_u8(self.standard_mode as u8);
8159 for val in &self.mode_name {
8160 __tmp.put_u8(*val);
8161 }
8162 if matches!(version, MavlinkVersion::V2) {
8163 let len = __tmp.len();
8164 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8165 } else {
8166 __tmp.len()
8167 }
8168 }
8169}
8170#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed. A receiver must re-request all available modes whenever the sequence number changes. This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change. See <https://mavlink.io/en/services/standard_modes.html>."]
8171#[doc = ""]
8172#[doc = "ID: 437"]
8173#[derive(Debug, Clone, PartialEq)]
8174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8176#[cfg_attr(feature = "ts", derive(TS))]
8177#[cfg_attr(feature = "ts", ts(export))]
8178pub struct AVAILABLE_MODES_MONITOR_DATA {
8179 #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
8180 pub seq: u8,
8181}
8182impl AVAILABLE_MODES_MONITOR_DATA {
8183 pub const ENCODED_LEN: usize = 1usize;
8184 pub const DEFAULT: Self = Self { seq: 0_u8 };
8185 #[cfg(feature = "arbitrary")]
8186 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8187 use arbitrary::{Arbitrary, Unstructured};
8188 let mut buf = [0u8; 1024];
8189 rng.fill_bytes(&mut buf);
8190 let mut unstructured = Unstructured::new(&buf);
8191 Self::arbitrary(&mut unstructured).unwrap_or_default()
8192 }
8193}
8194impl Default for AVAILABLE_MODES_MONITOR_DATA {
8195 fn default() -> Self {
8196 Self::DEFAULT.clone()
8197 }
8198}
8199impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
8200 type Message = MavMessage;
8201 const ID: u32 = 437u32;
8202 const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
8203 const EXTRA_CRC: u8 = 30u8;
8204 const ENCODED_LEN: usize = 1usize;
8205 fn deser(
8206 _version: MavlinkVersion,
8207 __input: &[u8],
8208 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8209 let avail_len = __input.len();
8210 let mut payload_buf = [0; Self::ENCODED_LEN];
8211 let mut buf = if avail_len < Self::ENCODED_LEN {
8212 payload_buf[0..avail_len].copy_from_slice(__input);
8213 Bytes::new(&payload_buf)
8214 } else {
8215 Bytes::new(__input)
8216 };
8217 let mut __struct = Self::default();
8218 __struct.seq = buf.get_u8()?;
8219 Ok(__struct)
8220 }
8221 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8222 let mut __tmp = BytesMut::new(bytes);
8223 #[allow(clippy::absurd_extreme_comparisons)]
8224 #[allow(unused_comparisons)]
8225 if __tmp.remaining() < Self::ENCODED_LEN {
8226 panic!(
8227 "buffer is too small (need {} bytes, but got {})",
8228 Self::ENCODED_LEN,
8229 __tmp.remaining(),
8230 )
8231 }
8232 __tmp.put_u8(self.seq);
8233 if matches!(version, MavlinkVersion::V2) {
8234 let len = __tmp.len();
8235 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8236 } else {
8237 __tmp.len()
8238 }
8239 }
8240}
8241#[doc = "Battery information that is static, or requires infrequent update. This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate. BATTERY_STATUS_V2 is used for higher-rate battery status information."]
8242#[doc = ""]
8243#[doc = "ID: 372"]
8244#[derive(Debug, Clone, PartialEq)]
8245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8247#[cfg_attr(feature = "ts", derive(TS))]
8248#[cfg_attr(feature = "ts", ts(export))]
8249pub struct BATTERY_INFO_DATA {
8250 #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
8251 pub discharge_minimum_voltage: f32,
8252 #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
8253 pub charging_minimum_voltage: f32,
8254 #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
8255 pub resting_minimum_voltage: f32,
8256 #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
8257 pub charging_maximum_voltage: f32,
8258 #[doc = "Maximum pack continuous charge current. 0: field not provided."]
8259 pub charging_maximum_current: f32,
8260 #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
8261 pub nominal_voltage: f32,
8262 #[doc = "Maximum pack discharge current. 0: field not provided."]
8263 pub discharge_maximum_current: f32,
8264 #[doc = "Maximum pack discharge burst current. 0: field not provided."]
8265 pub discharge_maximum_burst_current: f32,
8266 #[doc = "Fully charged design capacity. 0: field not provided."]
8267 pub design_capacity: f32,
8268 #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
8269 pub full_charge_capacity: f32,
8270 #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
8271 pub cycle_count: u16,
8272 #[doc = "Battery weight. 0: field not provided."]
8273 pub weight: u16,
8274 #[doc = "Battery ID"]
8275 pub id: u8,
8276 #[doc = "Function of the battery."]
8277 pub battery_function: MavBatteryFunction,
8278 #[doc = "Type (chemistry) of the battery."]
8279 pub mavtype: MavBatteryType,
8280 #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
8281 pub state_of_health: u8,
8282 #[doc = "Number of battery cells in series. 0: field not provided."]
8283 pub cells_in_series: u8,
8284 #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
8285 #[cfg_attr(feature = "ts", ts(type = "string"))]
8286 pub manufacture_date: CharArray<9>,
8287 #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
8288 #[cfg_attr(feature = "ts", ts(type = "string"))]
8289 pub serial_number: CharArray<32>,
8290 #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
8291 #[cfg_attr(feature = "ts", ts(type = "string"))]
8292 pub name: CharArray<50>,
8293}
8294impl BATTERY_INFO_DATA {
8295 pub const ENCODED_LEN: usize = 140usize;
8296 pub const DEFAULT: Self = Self {
8297 discharge_minimum_voltage: 0.0_f32,
8298 charging_minimum_voltage: 0.0_f32,
8299 resting_minimum_voltage: 0.0_f32,
8300 charging_maximum_voltage: 0.0_f32,
8301 charging_maximum_current: 0.0_f32,
8302 nominal_voltage: 0.0_f32,
8303 discharge_maximum_current: 0.0_f32,
8304 discharge_maximum_burst_current: 0.0_f32,
8305 design_capacity: 0.0_f32,
8306 full_charge_capacity: 0.0_f32,
8307 cycle_count: 0_u16,
8308 weight: 0_u16,
8309 id: 0_u8,
8310 battery_function: MavBatteryFunction::DEFAULT,
8311 mavtype: MavBatteryType::DEFAULT,
8312 state_of_health: 0_u8,
8313 cells_in_series: 0_u8,
8314 manufacture_date: CharArray::new([0_u8; 9usize]),
8315 serial_number: CharArray::new([0_u8; 32usize]),
8316 name: CharArray::new([0_u8; 50usize]),
8317 };
8318 #[cfg(feature = "arbitrary")]
8319 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8320 use arbitrary::{Arbitrary, Unstructured};
8321 let mut buf = [0u8; 1024];
8322 rng.fill_bytes(&mut buf);
8323 let mut unstructured = Unstructured::new(&buf);
8324 Self::arbitrary(&mut unstructured).unwrap_or_default()
8325 }
8326}
8327impl Default for BATTERY_INFO_DATA {
8328 fn default() -> Self {
8329 Self::DEFAULT.clone()
8330 }
8331}
8332impl MessageData for BATTERY_INFO_DATA {
8333 type Message = MavMessage;
8334 const ID: u32 = 372u32;
8335 const NAME: &'static str = "BATTERY_INFO";
8336 const EXTRA_CRC: u8 = 26u8;
8337 const ENCODED_LEN: usize = 140usize;
8338 fn deser(
8339 _version: MavlinkVersion,
8340 __input: &[u8],
8341 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8342 let avail_len = __input.len();
8343 let mut payload_buf = [0; Self::ENCODED_LEN];
8344 let mut buf = if avail_len < Self::ENCODED_LEN {
8345 payload_buf[0..avail_len].copy_from_slice(__input);
8346 Bytes::new(&payload_buf)
8347 } else {
8348 Bytes::new(__input)
8349 };
8350 let mut __struct = Self::default();
8351 __struct.discharge_minimum_voltage = buf.get_f32_le()?;
8352 __struct.charging_minimum_voltage = buf.get_f32_le()?;
8353 __struct.resting_minimum_voltage = buf.get_f32_le()?;
8354 __struct.charging_maximum_voltage = buf.get_f32_le()?;
8355 __struct.charging_maximum_current = buf.get_f32_le()?;
8356 __struct.nominal_voltage = buf.get_f32_le()?;
8357 __struct.discharge_maximum_current = buf.get_f32_le()?;
8358 __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
8359 __struct.design_capacity = buf.get_f32_le()?;
8360 __struct.full_charge_capacity = buf.get_f32_le()?;
8361 __struct.cycle_count = buf.get_u16_le()?;
8362 __struct.weight = buf.get_u16_le()?;
8363 __struct.id = buf.get_u8()?;
8364 let tmp = buf.get_u8()?;
8365 __struct.battery_function =
8366 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8367 enum_type: "MavBatteryFunction",
8368 value: tmp as u64,
8369 })?;
8370 let tmp = buf.get_u8()?;
8371 __struct.mavtype =
8372 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8373 enum_type: "MavBatteryType",
8374 value: tmp as u64,
8375 })?;
8376 __struct.state_of_health = buf.get_u8()?;
8377 __struct.cells_in_series = buf.get_u8()?;
8378 let mut tmp = [0_u8; 9usize];
8379 for v in &mut tmp {
8380 *v = buf.get_u8()?;
8381 }
8382 __struct.manufacture_date = CharArray::new(tmp);
8383 let mut tmp = [0_u8; 32usize];
8384 for v in &mut tmp {
8385 *v = buf.get_u8()?;
8386 }
8387 __struct.serial_number = CharArray::new(tmp);
8388 let mut tmp = [0_u8; 50usize];
8389 for v in &mut tmp {
8390 *v = buf.get_u8()?;
8391 }
8392 __struct.name = CharArray::new(tmp);
8393 Ok(__struct)
8394 }
8395 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8396 let mut __tmp = BytesMut::new(bytes);
8397 #[allow(clippy::absurd_extreme_comparisons)]
8398 #[allow(unused_comparisons)]
8399 if __tmp.remaining() < Self::ENCODED_LEN {
8400 panic!(
8401 "buffer is too small (need {} bytes, but got {})",
8402 Self::ENCODED_LEN,
8403 __tmp.remaining(),
8404 )
8405 }
8406 __tmp.put_f32_le(self.discharge_minimum_voltage);
8407 __tmp.put_f32_le(self.charging_minimum_voltage);
8408 __tmp.put_f32_le(self.resting_minimum_voltage);
8409 __tmp.put_f32_le(self.charging_maximum_voltage);
8410 __tmp.put_f32_le(self.charging_maximum_current);
8411 __tmp.put_f32_le(self.nominal_voltage);
8412 __tmp.put_f32_le(self.discharge_maximum_current);
8413 __tmp.put_f32_le(self.discharge_maximum_burst_current);
8414 __tmp.put_f32_le(self.design_capacity);
8415 __tmp.put_f32_le(self.full_charge_capacity);
8416 __tmp.put_u16_le(self.cycle_count);
8417 __tmp.put_u16_le(self.weight);
8418 __tmp.put_u8(self.id);
8419 __tmp.put_u8(self.battery_function as u8);
8420 __tmp.put_u8(self.mavtype as u8);
8421 __tmp.put_u8(self.state_of_health);
8422 __tmp.put_u8(self.cells_in_series);
8423 for val in &self.manufacture_date {
8424 __tmp.put_u8(*val);
8425 }
8426 for val in &self.serial_number {
8427 __tmp.put_u8(*val);
8428 }
8429 for val in &self.name {
8430 __tmp.put_u8(*val);
8431 }
8432 if matches!(version, MavlinkVersion::V2) {
8433 let len = __tmp.len();
8434 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8435 } else {
8436 __tmp.len()
8437 }
8438 }
8439}
8440#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
8441#[doc = ""]
8442#[doc = "ID: 147"]
8443#[derive(Debug, Clone, PartialEq)]
8444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8446#[cfg_attr(feature = "ts", derive(TS))]
8447#[cfg_attr(feature = "ts", ts(export))]
8448pub struct BATTERY_STATUS_DATA {
8449 #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
8450 pub current_consumed: i32,
8451 #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
8452 pub energy_consumed: i32,
8453 #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
8454 pub temperature: i16,
8455 #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
8456 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8457 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8458 pub voltages: [u16; 10],
8459 #[doc = "Battery current, -1: autopilot does not measure the current"]
8460 pub current_battery: i16,
8461 #[doc = "Battery ID"]
8462 pub id: u8,
8463 #[doc = "Function of the battery"]
8464 pub battery_function: MavBatteryFunction,
8465 #[doc = "Type (chemistry) of the battery"]
8466 pub mavtype: MavBatteryType,
8467 #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
8468 pub battery_remaining: i8,
8469 #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
8470 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8471 pub time_remaining: i32,
8472 #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
8473 #[cfg_attr(feature = "serde", serde(default))]
8474 pub charge_state: MavBatteryChargeState,
8475 #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
8476 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8477 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8478 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8479 pub voltages_ext: [u16; 4],
8480 #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
8481 #[cfg_attr(feature = "serde", serde(default))]
8482 pub mode: MavBatteryMode,
8483 #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
8484 #[cfg_attr(feature = "serde", serde(default))]
8485 pub fault_bitmask: MavBatteryFault,
8486}
8487impl BATTERY_STATUS_DATA {
8488 pub const ENCODED_LEN: usize = 54usize;
8489 pub const DEFAULT: Self = Self {
8490 current_consumed: 0_i32,
8491 energy_consumed: 0_i32,
8492 temperature: 0_i16,
8493 voltages: [0_u16; 10usize],
8494 current_battery: 0_i16,
8495 id: 0_u8,
8496 battery_function: MavBatteryFunction::DEFAULT,
8497 mavtype: MavBatteryType::DEFAULT,
8498 battery_remaining: 0_i8,
8499 time_remaining: 0_i32,
8500 charge_state: MavBatteryChargeState::DEFAULT,
8501 voltages_ext: [0_u16; 4usize],
8502 mode: MavBatteryMode::DEFAULT,
8503 fault_bitmask: MavBatteryFault::DEFAULT,
8504 };
8505 #[cfg(feature = "arbitrary")]
8506 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8507 use arbitrary::{Arbitrary, Unstructured};
8508 let mut buf = [0u8; 1024];
8509 rng.fill_bytes(&mut buf);
8510 let mut unstructured = Unstructured::new(&buf);
8511 Self::arbitrary(&mut unstructured).unwrap_or_default()
8512 }
8513}
8514impl Default for BATTERY_STATUS_DATA {
8515 fn default() -> Self {
8516 Self::DEFAULT.clone()
8517 }
8518}
8519impl MessageData for BATTERY_STATUS_DATA {
8520 type Message = MavMessage;
8521 const ID: u32 = 147u32;
8522 const NAME: &'static str = "BATTERY_STATUS";
8523 const EXTRA_CRC: u8 = 154u8;
8524 const ENCODED_LEN: usize = 54usize;
8525 fn deser(
8526 _version: MavlinkVersion,
8527 __input: &[u8],
8528 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8529 let avail_len = __input.len();
8530 let mut payload_buf = [0; Self::ENCODED_LEN];
8531 let mut buf = if avail_len < Self::ENCODED_LEN {
8532 payload_buf[0..avail_len].copy_from_slice(__input);
8533 Bytes::new(&payload_buf)
8534 } else {
8535 Bytes::new(__input)
8536 };
8537 let mut __struct = Self::default();
8538 __struct.current_consumed = buf.get_i32_le()?;
8539 __struct.energy_consumed = buf.get_i32_le()?;
8540 __struct.temperature = buf.get_i16_le()?;
8541 for v in &mut __struct.voltages {
8542 let val = buf.get_u16_le()?;
8543 *v = val;
8544 }
8545 __struct.current_battery = buf.get_i16_le()?;
8546 __struct.id = buf.get_u8()?;
8547 let tmp = buf.get_u8()?;
8548 __struct.battery_function =
8549 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8550 enum_type: "MavBatteryFunction",
8551 value: tmp as u64,
8552 })?;
8553 let tmp = buf.get_u8()?;
8554 __struct.mavtype =
8555 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8556 enum_type: "MavBatteryType",
8557 value: tmp as u64,
8558 })?;
8559 __struct.battery_remaining = buf.get_i8()?;
8560 __struct.time_remaining = buf.get_i32_le()?;
8561 let tmp = buf.get_u8()?;
8562 __struct.charge_state =
8563 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8564 enum_type: "MavBatteryChargeState",
8565 value: tmp as u64,
8566 })?;
8567 for v in &mut __struct.voltages_ext {
8568 let val = buf.get_u16_le()?;
8569 *v = val;
8570 }
8571 let tmp = buf.get_u8()?;
8572 __struct.mode =
8573 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8574 enum_type: "MavBatteryMode",
8575 value: tmp as u64,
8576 })?;
8577 let tmp = buf.get_u32_le()?;
8578 __struct.fault_bitmask = MavBatteryFault::from_bits(
8579 tmp as <MavBatteryFault as Flags>::Bits,
8580 )
8581 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8582 flag_type: "MavBatteryFault",
8583 value: tmp as u64,
8584 })?;
8585 Ok(__struct)
8586 }
8587 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8588 let mut __tmp = BytesMut::new(bytes);
8589 #[allow(clippy::absurd_extreme_comparisons)]
8590 #[allow(unused_comparisons)]
8591 if __tmp.remaining() < Self::ENCODED_LEN {
8592 panic!(
8593 "buffer is too small (need {} bytes, but got {})",
8594 Self::ENCODED_LEN,
8595 __tmp.remaining(),
8596 )
8597 }
8598 __tmp.put_i32_le(self.current_consumed);
8599 __tmp.put_i32_le(self.energy_consumed);
8600 __tmp.put_i16_le(self.temperature);
8601 for val in &self.voltages {
8602 __tmp.put_u16_le(*val);
8603 }
8604 __tmp.put_i16_le(self.current_battery);
8605 __tmp.put_u8(self.id);
8606 __tmp.put_u8(self.battery_function as u8);
8607 __tmp.put_u8(self.mavtype as u8);
8608 __tmp.put_i8(self.battery_remaining);
8609 if matches!(version, MavlinkVersion::V2) {
8610 __tmp.put_i32_le(self.time_remaining);
8611 __tmp.put_u8(self.charge_state as u8);
8612 for val in &self.voltages_ext {
8613 __tmp.put_u16_le(*val);
8614 }
8615 __tmp.put_u8(self.mode as u8);
8616 __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
8617 let len = __tmp.len();
8618 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8619 } else {
8620 __tmp.len()
8621 }
8622 }
8623}
8624#[doc = "Report button state change."]
8625#[doc = ""]
8626#[doc = "ID: 257"]
8627#[derive(Debug, Clone, PartialEq)]
8628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8630#[cfg_attr(feature = "ts", derive(TS))]
8631#[cfg_attr(feature = "ts", ts(export))]
8632pub struct BUTTON_CHANGE_DATA {
8633 #[doc = "Timestamp (time since system boot)."]
8634 pub time_boot_ms: u32,
8635 #[doc = "Time of last change of button state."]
8636 pub last_change_ms: u32,
8637 #[doc = "Bitmap for state of buttons."]
8638 pub state: u8,
8639}
8640impl BUTTON_CHANGE_DATA {
8641 pub const ENCODED_LEN: usize = 9usize;
8642 pub const DEFAULT: Self = Self {
8643 time_boot_ms: 0_u32,
8644 last_change_ms: 0_u32,
8645 state: 0_u8,
8646 };
8647 #[cfg(feature = "arbitrary")]
8648 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8649 use arbitrary::{Arbitrary, Unstructured};
8650 let mut buf = [0u8; 1024];
8651 rng.fill_bytes(&mut buf);
8652 let mut unstructured = Unstructured::new(&buf);
8653 Self::arbitrary(&mut unstructured).unwrap_or_default()
8654 }
8655}
8656impl Default for BUTTON_CHANGE_DATA {
8657 fn default() -> Self {
8658 Self::DEFAULT.clone()
8659 }
8660}
8661impl MessageData for BUTTON_CHANGE_DATA {
8662 type Message = MavMessage;
8663 const ID: u32 = 257u32;
8664 const NAME: &'static str = "BUTTON_CHANGE";
8665 const EXTRA_CRC: u8 = 131u8;
8666 const ENCODED_LEN: usize = 9usize;
8667 fn deser(
8668 _version: MavlinkVersion,
8669 __input: &[u8],
8670 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8671 let avail_len = __input.len();
8672 let mut payload_buf = [0; Self::ENCODED_LEN];
8673 let mut buf = if avail_len < Self::ENCODED_LEN {
8674 payload_buf[0..avail_len].copy_from_slice(__input);
8675 Bytes::new(&payload_buf)
8676 } else {
8677 Bytes::new(__input)
8678 };
8679 let mut __struct = Self::default();
8680 __struct.time_boot_ms = buf.get_u32_le()?;
8681 __struct.last_change_ms = buf.get_u32_le()?;
8682 __struct.state = buf.get_u8()?;
8683 Ok(__struct)
8684 }
8685 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8686 let mut __tmp = BytesMut::new(bytes);
8687 #[allow(clippy::absurd_extreme_comparisons)]
8688 #[allow(unused_comparisons)]
8689 if __tmp.remaining() < Self::ENCODED_LEN {
8690 panic!(
8691 "buffer is too small (need {} bytes, but got {})",
8692 Self::ENCODED_LEN,
8693 __tmp.remaining(),
8694 )
8695 }
8696 __tmp.put_u32_le(self.time_boot_ms);
8697 __tmp.put_u32_le(self.last_change_ms);
8698 __tmp.put_u8(self.state);
8699 if matches!(version, MavlinkVersion::V2) {
8700 let len = __tmp.len();
8701 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8702 } else {
8703 __tmp.len()
8704 }
8705 }
8706}
8707#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8708#[doc = ""]
8709#[doc = "ID: 262"]
8710#[derive(Debug, Clone, PartialEq)]
8711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8713#[cfg_attr(feature = "ts", derive(TS))]
8714#[cfg_attr(feature = "ts", ts(export))]
8715pub struct CAMERA_CAPTURE_STATUS_DATA {
8716 #[doc = "Timestamp (time since system boot)."]
8717 pub time_boot_ms: u32,
8718 #[doc = "Image capture interval"]
8719 pub image_interval: f32,
8720 #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
8721 pub recording_time_ms: u32,
8722 #[doc = "Available storage capacity."]
8723 pub available_capacity: f32,
8724 #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
8725 pub image_status: u8,
8726 #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
8727 pub video_status: u8,
8728 #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
8729 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8730 pub image_count: i32,
8731 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
8732 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8733 pub camera_device_id: u8,
8734}
8735impl CAMERA_CAPTURE_STATUS_DATA {
8736 pub const ENCODED_LEN: usize = 23usize;
8737 pub const DEFAULT: Self = Self {
8738 time_boot_ms: 0_u32,
8739 image_interval: 0.0_f32,
8740 recording_time_ms: 0_u32,
8741 available_capacity: 0.0_f32,
8742 image_status: 0_u8,
8743 video_status: 0_u8,
8744 image_count: 0_i32,
8745 camera_device_id: 0_u8,
8746 };
8747 #[cfg(feature = "arbitrary")]
8748 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8749 use arbitrary::{Arbitrary, Unstructured};
8750 let mut buf = [0u8; 1024];
8751 rng.fill_bytes(&mut buf);
8752 let mut unstructured = Unstructured::new(&buf);
8753 Self::arbitrary(&mut unstructured).unwrap_or_default()
8754 }
8755}
8756impl Default for CAMERA_CAPTURE_STATUS_DATA {
8757 fn default() -> Self {
8758 Self::DEFAULT.clone()
8759 }
8760}
8761impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
8762 type Message = MavMessage;
8763 const ID: u32 = 262u32;
8764 const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
8765 const EXTRA_CRC: u8 = 12u8;
8766 const ENCODED_LEN: usize = 23usize;
8767 fn deser(
8768 _version: MavlinkVersion,
8769 __input: &[u8],
8770 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8771 let avail_len = __input.len();
8772 let mut payload_buf = [0; Self::ENCODED_LEN];
8773 let mut buf = if avail_len < Self::ENCODED_LEN {
8774 payload_buf[0..avail_len].copy_from_slice(__input);
8775 Bytes::new(&payload_buf)
8776 } else {
8777 Bytes::new(__input)
8778 };
8779 let mut __struct = Self::default();
8780 __struct.time_boot_ms = buf.get_u32_le()?;
8781 __struct.image_interval = buf.get_f32_le()?;
8782 __struct.recording_time_ms = buf.get_u32_le()?;
8783 __struct.available_capacity = buf.get_f32_le()?;
8784 __struct.image_status = buf.get_u8()?;
8785 __struct.video_status = buf.get_u8()?;
8786 __struct.image_count = buf.get_i32_le()?;
8787 __struct.camera_device_id = buf.get_u8()?;
8788 Ok(__struct)
8789 }
8790 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8791 let mut __tmp = BytesMut::new(bytes);
8792 #[allow(clippy::absurd_extreme_comparisons)]
8793 #[allow(unused_comparisons)]
8794 if __tmp.remaining() < Self::ENCODED_LEN {
8795 panic!(
8796 "buffer is too small (need {} bytes, but got {})",
8797 Self::ENCODED_LEN,
8798 __tmp.remaining(),
8799 )
8800 }
8801 __tmp.put_u32_le(self.time_boot_ms);
8802 __tmp.put_f32_le(self.image_interval);
8803 __tmp.put_u32_le(self.recording_time_ms);
8804 __tmp.put_f32_le(self.available_capacity);
8805 __tmp.put_u8(self.image_status);
8806 __tmp.put_u8(self.video_status);
8807 if matches!(version, MavlinkVersion::V2) {
8808 __tmp.put_i32_le(self.image_count);
8809 __tmp.put_u8(self.camera_device_id);
8810 let len = __tmp.len();
8811 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8812 } else {
8813 __tmp.len()
8814 }
8815 }
8816}
8817#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8818#[doc = ""]
8819#[doc = "ID: 271"]
8820#[derive(Debug, Clone, PartialEq)]
8821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8823#[cfg_attr(feature = "ts", derive(TS))]
8824#[cfg_attr(feature = "ts", ts(export))]
8825pub struct CAMERA_FOV_STATUS_DATA {
8826 #[doc = "Timestamp (time since system boot)."]
8827 pub time_boot_ms: u32,
8828 #[doc = "Latitude of camera (INT32_MAX if unknown)."]
8829 pub lat_camera: i32,
8830 #[doc = "Longitude of camera (INT32_MAX if unknown)."]
8831 pub lon_camera: i32,
8832 #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
8833 pub alt_camera: i32,
8834 #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
8835 pub lat_image: i32,
8836 #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
8837 pub lon_image: i32,
8838 #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
8839 pub alt_image: i32,
8840 #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
8841 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8842 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8843 pub q: [f32; 4],
8844 #[doc = "Horizontal field of view (NaN if unknown)."]
8845 pub hfov: f32,
8846 #[doc = "Vertical field of view (NaN if unknown)."]
8847 pub vfov: f32,
8848 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
8849 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8850 pub camera_device_id: u8,
8851}
8852impl CAMERA_FOV_STATUS_DATA {
8853 pub const ENCODED_LEN: usize = 53usize;
8854 pub const DEFAULT: Self = Self {
8855 time_boot_ms: 0_u32,
8856 lat_camera: 0_i32,
8857 lon_camera: 0_i32,
8858 alt_camera: 0_i32,
8859 lat_image: 0_i32,
8860 lon_image: 0_i32,
8861 alt_image: 0_i32,
8862 q: [0.0_f32; 4usize],
8863 hfov: 0.0_f32,
8864 vfov: 0.0_f32,
8865 camera_device_id: 0_u8,
8866 };
8867 #[cfg(feature = "arbitrary")]
8868 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8869 use arbitrary::{Arbitrary, Unstructured};
8870 let mut buf = [0u8; 1024];
8871 rng.fill_bytes(&mut buf);
8872 let mut unstructured = Unstructured::new(&buf);
8873 Self::arbitrary(&mut unstructured).unwrap_or_default()
8874 }
8875}
8876impl Default for CAMERA_FOV_STATUS_DATA {
8877 fn default() -> Self {
8878 Self::DEFAULT.clone()
8879 }
8880}
8881impl MessageData for CAMERA_FOV_STATUS_DATA {
8882 type Message = MavMessage;
8883 const ID: u32 = 271u32;
8884 const NAME: &'static str = "CAMERA_FOV_STATUS";
8885 const EXTRA_CRC: u8 = 22u8;
8886 const ENCODED_LEN: usize = 53usize;
8887 fn deser(
8888 _version: MavlinkVersion,
8889 __input: &[u8],
8890 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8891 let avail_len = __input.len();
8892 let mut payload_buf = [0; Self::ENCODED_LEN];
8893 let mut buf = if avail_len < Self::ENCODED_LEN {
8894 payload_buf[0..avail_len].copy_from_slice(__input);
8895 Bytes::new(&payload_buf)
8896 } else {
8897 Bytes::new(__input)
8898 };
8899 let mut __struct = Self::default();
8900 __struct.time_boot_ms = buf.get_u32_le()?;
8901 __struct.lat_camera = buf.get_i32_le()?;
8902 __struct.lon_camera = buf.get_i32_le()?;
8903 __struct.alt_camera = buf.get_i32_le()?;
8904 __struct.lat_image = buf.get_i32_le()?;
8905 __struct.lon_image = buf.get_i32_le()?;
8906 __struct.alt_image = buf.get_i32_le()?;
8907 for v in &mut __struct.q {
8908 let val = buf.get_f32_le()?;
8909 *v = val;
8910 }
8911 __struct.hfov = buf.get_f32_le()?;
8912 __struct.vfov = buf.get_f32_le()?;
8913 __struct.camera_device_id = buf.get_u8()?;
8914 Ok(__struct)
8915 }
8916 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8917 let mut __tmp = BytesMut::new(bytes);
8918 #[allow(clippy::absurd_extreme_comparisons)]
8919 #[allow(unused_comparisons)]
8920 if __tmp.remaining() < Self::ENCODED_LEN {
8921 panic!(
8922 "buffer is too small (need {} bytes, but got {})",
8923 Self::ENCODED_LEN,
8924 __tmp.remaining(),
8925 )
8926 }
8927 __tmp.put_u32_le(self.time_boot_ms);
8928 __tmp.put_i32_le(self.lat_camera);
8929 __tmp.put_i32_le(self.lon_camera);
8930 __tmp.put_i32_le(self.alt_camera);
8931 __tmp.put_i32_le(self.lat_image);
8932 __tmp.put_i32_le(self.lon_image);
8933 __tmp.put_i32_le(self.alt_image);
8934 for val in &self.q {
8935 __tmp.put_f32_le(*val);
8936 }
8937 __tmp.put_f32_le(self.hfov);
8938 __tmp.put_f32_le(self.vfov);
8939 if matches!(version, MavlinkVersion::V2) {
8940 __tmp.put_u8(self.camera_device_id);
8941 let len = __tmp.len();
8942 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8943 } else {
8944 __tmp.len()
8945 }
8946 }
8947}
8948#[doc = "Information about a captured image. This is emitted every time a message is captured. MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers: MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers. MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send: set to 0 (default) to send just the the message for the sequence number in param 2, set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers, set to the sequence number of the final message in the range."]
8949#[doc = ""]
8950#[doc = "ID: 263"]
8951#[derive(Debug, Clone, PartialEq)]
8952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8954#[cfg_attr(feature = "ts", derive(TS))]
8955#[cfg_attr(feature = "ts", ts(export))]
8956pub struct CAMERA_IMAGE_CAPTURED_DATA {
8957 #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
8958 pub time_utc: u64,
8959 #[doc = "Timestamp (time since system boot)."]
8960 pub time_boot_ms: u32,
8961 #[doc = "Latitude where image was taken"]
8962 pub lat: i32,
8963 #[doc = "Longitude where capture was taken"]
8964 pub lon: i32,
8965 #[doc = "Altitude (MSL) where image was taken"]
8966 pub alt: i32,
8967 #[doc = "Altitude above ground"]
8968 pub relative_alt: i32,
8969 #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
8970 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8971 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8972 pub q: [f32; 4],
8973 #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
8974 pub image_index: i32,
8975 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
8976 pub camera_id: u8,
8977 #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
8978 pub capture_result: i8,
8979 #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
8980 #[cfg_attr(feature = "ts", ts(type = "string"))]
8981 pub file_url: CharArray<205>,
8982}
8983impl CAMERA_IMAGE_CAPTURED_DATA {
8984 pub const ENCODED_LEN: usize = 255usize;
8985 pub const DEFAULT: Self = Self {
8986 time_utc: 0_u64,
8987 time_boot_ms: 0_u32,
8988 lat: 0_i32,
8989 lon: 0_i32,
8990 alt: 0_i32,
8991 relative_alt: 0_i32,
8992 q: [0.0_f32; 4usize],
8993 image_index: 0_i32,
8994 camera_id: 0_u8,
8995 capture_result: 0_i8,
8996 file_url: CharArray::new([0_u8; 205usize]),
8997 };
8998 #[cfg(feature = "arbitrary")]
8999 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9000 use arbitrary::{Arbitrary, Unstructured};
9001 let mut buf = [0u8; 1024];
9002 rng.fill_bytes(&mut buf);
9003 let mut unstructured = Unstructured::new(&buf);
9004 Self::arbitrary(&mut unstructured).unwrap_or_default()
9005 }
9006}
9007impl Default for CAMERA_IMAGE_CAPTURED_DATA {
9008 fn default() -> Self {
9009 Self::DEFAULT.clone()
9010 }
9011}
9012impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
9013 type Message = MavMessage;
9014 const ID: u32 = 263u32;
9015 const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
9016 const EXTRA_CRC: u8 = 133u8;
9017 const ENCODED_LEN: usize = 255usize;
9018 fn deser(
9019 _version: MavlinkVersion,
9020 __input: &[u8],
9021 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9022 let avail_len = __input.len();
9023 let mut payload_buf = [0; Self::ENCODED_LEN];
9024 let mut buf = if avail_len < Self::ENCODED_LEN {
9025 payload_buf[0..avail_len].copy_from_slice(__input);
9026 Bytes::new(&payload_buf)
9027 } else {
9028 Bytes::new(__input)
9029 };
9030 let mut __struct = Self::default();
9031 __struct.time_utc = buf.get_u64_le()?;
9032 __struct.time_boot_ms = buf.get_u32_le()?;
9033 __struct.lat = buf.get_i32_le()?;
9034 __struct.lon = buf.get_i32_le()?;
9035 __struct.alt = buf.get_i32_le()?;
9036 __struct.relative_alt = buf.get_i32_le()?;
9037 for v in &mut __struct.q {
9038 let val = buf.get_f32_le()?;
9039 *v = val;
9040 }
9041 __struct.image_index = buf.get_i32_le()?;
9042 __struct.camera_id = buf.get_u8()?;
9043 __struct.capture_result = buf.get_i8()?;
9044 let mut tmp = [0_u8; 205usize];
9045 for v in &mut tmp {
9046 *v = buf.get_u8()?;
9047 }
9048 __struct.file_url = CharArray::new(tmp);
9049 Ok(__struct)
9050 }
9051 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9052 let mut __tmp = BytesMut::new(bytes);
9053 #[allow(clippy::absurd_extreme_comparisons)]
9054 #[allow(unused_comparisons)]
9055 if __tmp.remaining() < Self::ENCODED_LEN {
9056 panic!(
9057 "buffer is too small (need {} bytes, but got {})",
9058 Self::ENCODED_LEN,
9059 __tmp.remaining(),
9060 )
9061 }
9062 __tmp.put_u64_le(self.time_utc);
9063 __tmp.put_u32_le(self.time_boot_ms);
9064 __tmp.put_i32_le(self.lat);
9065 __tmp.put_i32_le(self.lon);
9066 __tmp.put_i32_le(self.alt);
9067 __tmp.put_i32_le(self.relative_alt);
9068 for val in &self.q {
9069 __tmp.put_f32_le(*val);
9070 }
9071 __tmp.put_i32_le(self.image_index);
9072 __tmp.put_u8(self.camera_id);
9073 __tmp.put_i8(self.capture_result);
9074 for val in &self.file_url {
9075 __tmp.put_u8(*val);
9076 }
9077 if matches!(version, MavlinkVersion::V2) {
9078 let len = __tmp.len();
9079 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9080 } else {
9081 __tmp.len()
9082 }
9083 }
9084}
9085#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9086#[doc = ""]
9087#[doc = "ID: 259"]
9088#[derive(Debug, Clone, PartialEq)]
9089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9091#[cfg_attr(feature = "ts", derive(TS))]
9092#[cfg_attr(feature = "ts", ts(export))]
9093pub struct CAMERA_INFORMATION_DATA {
9094 #[doc = "Timestamp (time since system boot)."]
9095 pub time_boot_ms: u32,
9096 #[doc = "Version of the camera firmware, encoded as: (Dev&0xff)<<24 | (Patch&0xff)<<16 | (Minor&0xff)<<8 | (Major&0xff). Use 0 if not known."]
9097 pub firmware_version: u32,
9098 #[doc = "Focal length. Use NaN if not known."]
9099 pub focal_length: f32,
9100 #[doc = "Image sensor size horizontal. Use NaN if not known."]
9101 pub sensor_size_h: f32,
9102 #[doc = "Image sensor size vertical. Use NaN if not known."]
9103 pub sensor_size_v: f32,
9104 #[doc = "Bitmap of camera capability flags."]
9105 pub flags: CameraCapFlags,
9106 #[doc = "Horizontal image resolution. Use 0 if not known."]
9107 pub resolution_h: u16,
9108 #[doc = "Vertical image resolution. Use 0 if not known."]
9109 pub resolution_v: u16,
9110 #[doc = "Camera definition version (iteration). Use 0 if not known."]
9111 pub cam_definition_version: u16,
9112 #[doc = "Name of the camera vendor"]
9113 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9114 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9115 pub vendor_name: [u8; 32],
9116 #[doc = "Name of the camera model"]
9117 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9118 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9119 pub model_name: [u8; 32],
9120 #[doc = "Reserved for a lens ID. Use 0 if not known."]
9121 pub lens_id: u8,
9122 #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated. Use a zero-length string if not known."]
9123 #[cfg_attr(feature = "ts", ts(type = "string"))]
9124 pub cam_definition_uri: CharArray<140>,
9125 #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
9126 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9127 pub gimbal_device_id: u8,
9128 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9129 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9130 pub camera_device_id: u8,
9131}
9132impl CAMERA_INFORMATION_DATA {
9133 pub const ENCODED_LEN: usize = 237usize;
9134 pub const DEFAULT: Self = Self {
9135 time_boot_ms: 0_u32,
9136 firmware_version: 0_u32,
9137 focal_length: 0.0_f32,
9138 sensor_size_h: 0.0_f32,
9139 sensor_size_v: 0.0_f32,
9140 flags: CameraCapFlags::DEFAULT,
9141 resolution_h: 0_u16,
9142 resolution_v: 0_u16,
9143 cam_definition_version: 0_u16,
9144 vendor_name: [0_u8; 32usize],
9145 model_name: [0_u8; 32usize],
9146 lens_id: 0_u8,
9147 cam_definition_uri: CharArray::new([0_u8; 140usize]),
9148 gimbal_device_id: 0_u8,
9149 camera_device_id: 0_u8,
9150 };
9151 #[cfg(feature = "arbitrary")]
9152 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9153 use arbitrary::{Arbitrary, Unstructured};
9154 let mut buf = [0u8; 1024];
9155 rng.fill_bytes(&mut buf);
9156 let mut unstructured = Unstructured::new(&buf);
9157 Self::arbitrary(&mut unstructured).unwrap_or_default()
9158 }
9159}
9160impl Default for CAMERA_INFORMATION_DATA {
9161 fn default() -> Self {
9162 Self::DEFAULT.clone()
9163 }
9164}
9165impl MessageData for CAMERA_INFORMATION_DATA {
9166 type Message = MavMessage;
9167 const ID: u32 = 259u32;
9168 const NAME: &'static str = "CAMERA_INFORMATION";
9169 const EXTRA_CRC: u8 = 92u8;
9170 const ENCODED_LEN: usize = 237usize;
9171 fn deser(
9172 _version: MavlinkVersion,
9173 __input: &[u8],
9174 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9175 let avail_len = __input.len();
9176 let mut payload_buf = [0; Self::ENCODED_LEN];
9177 let mut buf = if avail_len < Self::ENCODED_LEN {
9178 payload_buf[0..avail_len].copy_from_slice(__input);
9179 Bytes::new(&payload_buf)
9180 } else {
9181 Bytes::new(__input)
9182 };
9183 let mut __struct = Self::default();
9184 __struct.time_boot_ms = buf.get_u32_le()?;
9185 __struct.firmware_version = buf.get_u32_le()?;
9186 __struct.focal_length = buf.get_f32_le()?;
9187 __struct.sensor_size_h = buf.get_f32_le()?;
9188 __struct.sensor_size_v = buf.get_f32_le()?;
9189 let tmp = buf.get_u32_le()?;
9190 __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
9191 ::mavlink_core::error::ParserError::InvalidFlag {
9192 flag_type: "CameraCapFlags",
9193 value: tmp as u64,
9194 },
9195 )?;
9196 __struct.resolution_h = buf.get_u16_le()?;
9197 __struct.resolution_v = buf.get_u16_le()?;
9198 __struct.cam_definition_version = buf.get_u16_le()?;
9199 for v in &mut __struct.vendor_name {
9200 let val = buf.get_u8()?;
9201 *v = val;
9202 }
9203 for v in &mut __struct.model_name {
9204 let val = buf.get_u8()?;
9205 *v = val;
9206 }
9207 __struct.lens_id = buf.get_u8()?;
9208 let mut tmp = [0_u8; 140usize];
9209 for v in &mut tmp {
9210 *v = buf.get_u8()?;
9211 }
9212 __struct.cam_definition_uri = CharArray::new(tmp);
9213 __struct.gimbal_device_id = buf.get_u8()?;
9214 __struct.camera_device_id = buf.get_u8()?;
9215 Ok(__struct)
9216 }
9217 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9218 let mut __tmp = BytesMut::new(bytes);
9219 #[allow(clippy::absurd_extreme_comparisons)]
9220 #[allow(unused_comparisons)]
9221 if __tmp.remaining() < Self::ENCODED_LEN {
9222 panic!(
9223 "buffer is too small (need {} bytes, but got {})",
9224 Self::ENCODED_LEN,
9225 __tmp.remaining(),
9226 )
9227 }
9228 __tmp.put_u32_le(self.time_boot_ms);
9229 __tmp.put_u32_le(self.firmware_version);
9230 __tmp.put_f32_le(self.focal_length);
9231 __tmp.put_f32_le(self.sensor_size_h);
9232 __tmp.put_f32_le(self.sensor_size_v);
9233 __tmp.put_u32_le(self.flags.bits() as u32);
9234 __tmp.put_u16_le(self.resolution_h);
9235 __tmp.put_u16_le(self.resolution_v);
9236 __tmp.put_u16_le(self.cam_definition_version);
9237 for val in &self.vendor_name {
9238 __tmp.put_u8(*val);
9239 }
9240 for val in &self.model_name {
9241 __tmp.put_u8(*val);
9242 }
9243 __tmp.put_u8(self.lens_id);
9244 for val in &self.cam_definition_uri {
9245 __tmp.put_u8(*val);
9246 }
9247 if matches!(version, MavlinkVersion::V2) {
9248 __tmp.put_u8(self.gimbal_device_id);
9249 __tmp.put_u8(self.camera_device_id);
9250 let len = __tmp.len();
9251 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9252 } else {
9253 __tmp.len()
9254 }
9255 }
9256}
9257#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9258#[doc = ""]
9259#[doc = "ID: 260"]
9260#[derive(Debug, Clone, PartialEq)]
9261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9263#[cfg_attr(feature = "ts", derive(TS))]
9264#[cfg_attr(feature = "ts", ts(export))]
9265pub struct CAMERA_SETTINGS_DATA {
9266 #[doc = "Timestamp (time since system boot)."]
9267 pub time_boot_ms: u32,
9268 #[doc = "Camera mode"]
9269 pub mode_id: CameraMode,
9270 #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
9271 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9272 pub zoomLevel: f32,
9273 #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
9274 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9275 pub focusLevel: f32,
9276 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9277 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9278 pub camera_device_id: u8,
9279}
9280impl CAMERA_SETTINGS_DATA {
9281 pub const ENCODED_LEN: usize = 14usize;
9282 pub const DEFAULT: Self = Self {
9283 time_boot_ms: 0_u32,
9284 mode_id: CameraMode::DEFAULT,
9285 zoomLevel: 0.0_f32,
9286 focusLevel: 0.0_f32,
9287 camera_device_id: 0_u8,
9288 };
9289 #[cfg(feature = "arbitrary")]
9290 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9291 use arbitrary::{Arbitrary, Unstructured};
9292 let mut buf = [0u8; 1024];
9293 rng.fill_bytes(&mut buf);
9294 let mut unstructured = Unstructured::new(&buf);
9295 Self::arbitrary(&mut unstructured).unwrap_or_default()
9296 }
9297}
9298impl Default for CAMERA_SETTINGS_DATA {
9299 fn default() -> Self {
9300 Self::DEFAULT.clone()
9301 }
9302}
9303impl MessageData for CAMERA_SETTINGS_DATA {
9304 type Message = MavMessage;
9305 const ID: u32 = 260u32;
9306 const NAME: &'static str = "CAMERA_SETTINGS";
9307 const EXTRA_CRC: u8 = 146u8;
9308 const ENCODED_LEN: usize = 14usize;
9309 fn deser(
9310 _version: MavlinkVersion,
9311 __input: &[u8],
9312 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9313 let avail_len = __input.len();
9314 let mut payload_buf = [0; Self::ENCODED_LEN];
9315 let mut buf = if avail_len < Self::ENCODED_LEN {
9316 payload_buf[0..avail_len].copy_from_slice(__input);
9317 Bytes::new(&payload_buf)
9318 } else {
9319 Bytes::new(__input)
9320 };
9321 let mut __struct = Self::default();
9322 __struct.time_boot_ms = buf.get_u32_le()?;
9323 let tmp = buf.get_u8()?;
9324 __struct.mode_id =
9325 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9326 enum_type: "CameraMode",
9327 value: tmp as u64,
9328 })?;
9329 __struct.zoomLevel = buf.get_f32_le()?;
9330 __struct.focusLevel = buf.get_f32_le()?;
9331 __struct.camera_device_id = buf.get_u8()?;
9332 Ok(__struct)
9333 }
9334 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9335 let mut __tmp = BytesMut::new(bytes);
9336 #[allow(clippy::absurd_extreme_comparisons)]
9337 #[allow(unused_comparisons)]
9338 if __tmp.remaining() < Self::ENCODED_LEN {
9339 panic!(
9340 "buffer is too small (need {} bytes, but got {})",
9341 Self::ENCODED_LEN,
9342 __tmp.remaining(),
9343 )
9344 }
9345 __tmp.put_u32_le(self.time_boot_ms);
9346 __tmp.put_u8(self.mode_id as u8);
9347 if matches!(version, MavlinkVersion::V2) {
9348 __tmp.put_f32_le(self.zoomLevel);
9349 __tmp.put_f32_le(self.focusLevel);
9350 __tmp.put_u8(self.camera_device_id);
9351 let len = __tmp.len();
9352 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9353 } else {
9354 __tmp.len()
9355 }
9356 }
9357}
9358#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
9359#[doc = ""]
9360#[doc = "ID: 277"]
9361#[derive(Debug, Clone, PartialEq)]
9362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9364#[cfg_attr(feature = "ts", derive(TS))]
9365#[cfg_attr(feature = "ts", ts(export))]
9366pub struct CAMERA_THERMAL_RANGE_DATA {
9367 #[doc = "Timestamp (time since system boot)."]
9368 pub time_boot_ms: u32,
9369 #[doc = "Temperature max."]
9370 pub max: f32,
9371 #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
9372 pub max_point_x: f32,
9373 #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
9374 pub max_point_y: f32,
9375 #[doc = "Temperature min."]
9376 pub min: f32,
9377 #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
9378 pub min_point_x: f32,
9379 #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
9380 pub min_point_y: f32,
9381 #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
9382 pub stream_id: u8,
9383 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9384 pub camera_device_id: u8,
9385}
9386impl CAMERA_THERMAL_RANGE_DATA {
9387 pub const ENCODED_LEN: usize = 30usize;
9388 pub const DEFAULT: Self = Self {
9389 time_boot_ms: 0_u32,
9390 max: 0.0_f32,
9391 max_point_x: 0.0_f32,
9392 max_point_y: 0.0_f32,
9393 min: 0.0_f32,
9394 min_point_x: 0.0_f32,
9395 min_point_y: 0.0_f32,
9396 stream_id: 0_u8,
9397 camera_device_id: 0_u8,
9398 };
9399 #[cfg(feature = "arbitrary")]
9400 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9401 use arbitrary::{Arbitrary, Unstructured};
9402 let mut buf = [0u8; 1024];
9403 rng.fill_bytes(&mut buf);
9404 let mut unstructured = Unstructured::new(&buf);
9405 Self::arbitrary(&mut unstructured).unwrap_or_default()
9406 }
9407}
9408impl Default for CAMERA_THERMAL_RANGE_DATA {
9409 fn default() -> Self {
9410 Self::DEFAULT.clone()
9411 }
9412}
9413impl MessageData for CAMERA_THERMAL_RANGE_DATA {
9414 type Message = MavMessage;
9415 const ID: u32 = 277u32;
9416 const NAME: &'static str = "CAMERA_THERMAL_RANGE";
9417 const EXTRA_CRC: u8 = 62u8;
9418 const ENCODED_LEN: usize = 30usize;
9419 fn deser(
9420 _version: MavlinkVersion,
9421 __input: &[u8],
9422 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9423 let avail_len = __input.len();
9424 let mut payload_buf = [0; Self::ENCODED_LEN];
9425 let mut buf = if avail_len < Self::ENCODED_LEN {
9426 payload_buf[0..avail_len].copy_from_slice(__input);
9427 Bytes::new(&payload_buf)
9428 } else {
9429 Bytes::new(__input)
9430 };
9431 let mut __struct = Self::default();
9432 __struct.time_boot_ms = buf.get_u32_le()?;
9433 __struct.max = buf.get_f32_le()?;
9434 __struct.max_point_x = buf.get_f32_le()?;
9435 __struct.max_point_y = buf.get_f32_le()?;
9436 __struct.min = buf.get_f32_le()?;
9437 __struct.min_point_x = buf.get_f32_le()?;
9438 __struct.min_point_y = buf.get_f32_le()?;
9439 __struct.stream_id = buf.get_u8()?;
9440 __struct.camera_device_id = buf.get_u8()?;
9441 Ok(__struct)
9442 }
9443 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9444 let mut __tmp = BytesMut::new(bytes);
9445 #[allow(clippy::absurd_extreme_comparisons)]
9446 #[allow(unused_comparisons)]
9447 if __tmp.remaining() < Self::ENCODED_LEN {
9448 panic!(
9449 "buffer is too small (need {} bytes, but got {})",
9450 Self::ENCODED_LEN,
9451 __tmp.remaining(),
9452 )
9453 }
9454 __tmp.put_u32_le(self.time_boot_ms);
9455 __tmp.put_f32_le(self.max);
9456 __tmp.put_f32_le(self.max_point_x);
9457 __tmp.put_f32_le(self.max_point_y);
9458 __tmp.put_f32_le(self.min);
9459 __tmp.put_f32_le(self.min_point_x);
9460 __tmp.put_f32_le(self.min_point_y);
9461 __tmp.put_u8(self.stream_id);
9462 __tmp.put_u8(self.camera_device_id);
9463 if matches!(version, MavlinkVersion::V2) {
9464 let len = __tmp.len();
9465 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9466 } else {
9467 __tmp.len()
9468 }
9469 }
9470}
9471#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
9472#[doc = ""]
9473#[doc = "ID: 276"]
9474#[derive(Debug, Clone, PartialEq)]
9475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9477#[cfg_attr(feature = "ts", derive(TS))]
9478#[cfg_attr(feature = "ts", ts(export))]
9479pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
9480 #[doc = "Latitude of tracked object"]
9481 pub lat: i32,
9482 #[doc = "Longitude of tracked object"]
9483 pub lon: i32,
9484 #[doc = "Altitude of tracked object(AMSL, WGS84)"]
9485 pub alt: f32,
9486 #[doc = "Horizontal accuracy. NAN if unknown"]
9487 pub h_acc: f32,
9488 #[doc = "Vertical accuracy. NAN if unknown"]
9489 pub v_acc: f32,
9490 #[doc = "North velocity of tracked object. NAN if unknown"]
9491 pub vel_n: f32,
9492 #[doc = "East velocity of tracked object. NAN if unknown"]
9493 pub vel_e: f32,
9494 #[doc = "Down velocity of tracked object. NAN if unknown"]
9495 pub vel_d: f32,
9496 #[doc = "Velocity accuracy. NAN if unknown"]
9497 pub vel_acc: f32,
9498 #[doc = "Distance between camera and tracked object. NAN if unknown"]
9499 pub dist: f32,
9500 #[doc = "Heading in radians, in NED. NAN if unknown"]
9501 pub hdg: f32,
9502 #[doc = "Accuracy of heading, in NED. NAN if unknown"]
9503 pub hdg_acc: f32,
9504 #[doc = "Current tracking status"]
9505 pub tracking_status: CameraTrackingStatusFlags,
9506 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9507 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9508 pub camera_device_id: u8,
9509}
9510impl CAMERA_TRACKING_GEO_STATUS_DATA {
9511 pub const ENCODED_LEN: usize = 50usize;
9512 pub const DEFAULT: Self = Self {
9513 lat: 0_i32,
9514 lon: 0_i32,
9515 alt: 0.0_f32,
9516 h_acc: 0.0_f32,
9517 v_acc: 0.0_f32,
9518 vel_n: 0.0_f32,
9519 vel_e: 0.0_f32,
9520 vel_d: 0.0_f32,
9521 vel_acc: 0.0_f32,
9522 dist: 0.0_f32,
9523 hdg: 0.0_f32,
9524 hdg_acc: 0.0_f32,
9525 tracking_status: CameraTrackingStatusFlags::DEFAULT,
9526 camera_device_id: 0_u8,
9527 };
9528 #[cfg(feature = "arbitrary")]
9529 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9530 use arbitrary::{Arbitrary, Unstructured};
9531 let mut buf = [0u8; 1024];
9532 rng.fill_bytes(&mut buf);
9533 let mut unstructured = Unstructured::new(&buf);
9534 Self::arbitrary(&mut unstructured).unwrap_or_default()
9535 }
9536}
9537impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
9538 fn default() -> Self {
9539 Self::DEFAULT.clone()
9540 }
9541}
9542impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
9543 type Message = MavMessage;
9544 const ID: u32 = 276u32;
9545 const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
9546 const EXTRA_CRC: u8 = 18u8;
9547 const ENCODED_LEN: usize = 50usize;
9548 fn deser(
9549 _version: MavlinkVersion,
9550 __input: &[u8],
9551 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9552 let avail_len = __input.len();
9553 let mut payload_buf = [0; Self::ENCODED_LEN];
9554 let mut buf = if avail_len < Self::ENCODED_LEN {
9555 payload_buf[0..avail_len].copy_from_slice(__input);
9556 Bytes::new(&payload_buf)
9557 } else {
9558 Bytes::new(__input)
9559 };
9560 let mut __struct = Self::default();
9561 __struct.lat = buf.get_i32_le()?;
9562 __struct.lon = buf.get_i32_le()?;
9563 __struct.alt = buf.get_f32_le()?;
9564 __struct.h_acc = buf.get_f32_le()?;
9565 __struct.v_acc = buf.get_f32_le()?;
9566 __struct.vel_n = buf.get_f32_le()?;
9567 __struct.vel_e = buf.get_f32_le()?;
9568 __struct.vel_d = buf.get_f32_le()?;
9569 __struct.vel_acc = buf.get_f32_le()?;
9570 __struct.dist = buf.get_f32_le()?;
9571 __struct.hdg = buf.get_f32_le()?;
9572 __struct.hdg_acc = buf.get_f32_le()?;
9573 let tmp = buf.get_u8()?;
9574 __struct.tracking_status =
9575 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9576 enum_type: "CameraTrackingStatusFlags",
9577 value: tmp as u64,
9578 })?;
9579 __struct.camera_device_id = buf.get_u8()?;
9580 Ok(__struct)
9581 }
9582 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9583 let mut __tmp = BytesMut::new(bytes);
9584 #[allow(clippy::absurd_extreme_comparisons)]
9585 #[allow(unused_comparisons)]
9586 if __tmp.remaining() < Self::ENCODED_LEN {
9587 panic!(
9588 "buffer is too small (need {} bytes, but got {})",
9589 Self::ENCODED_LEN,
9590 __tmp.remaining(),
9591 )
9592 }
9593 __tmp.put_i32_le(self.lat);
9594 __tmp.put_i32_le(self.lon);
9595 __tmp.put_f32_le(self.alt);
9596 __tmp.put_f32_le(self.h_acc);
9597 __tmp.put_f32_le(self.v_acc);
9598 __tmp.put_f32_le(self.vel_n);
9599 __tmp.put_f32_le(self.vel_e);
9600 __tmp.put_f32_le(self.vel_d);
9601 __tmp.put_f32_le(self.vel_acc);
9602 __tmp.put_f32_le(self.dist);
9603 __tmp.put_f32_le(self.hdg);
9604 __tmp.put_f32_le(self.hdg_acc);
9605 __tmp.put_u8(self.tracking_status as u8);
9606 if matches!(version, MavlinkVersion::V2) {
9607 __tmp.put_u8(self.camera_device_id);
9608 let len = __tmp.len();
9609 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9610 } else {
9611 __tmp.len()
9612 }
9613 }
9614}
9615#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
9616#[doc = ""]
9617#[doc = "ID: 275"]
9618#[derive(Debug, Clone, PartialEq)]
9619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9621#[cfg_attr(feature = "ts", derive(TS))]
9622#[cfg_attr(feature = "ts", ts(export))]
9623pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
9624 #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
9625 pub point_x: f32,
9626 #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
9627 pub point_y: f32,
9628 #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
9629 pub radius: f32,
9630 #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
9631 pub rec_top_x: f32,
9632 #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
9633 pub rec_top_y: f32,
9634 #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
9635 pub rec_bottom_x: f32,
9636 #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
9637 pub rec_bottom_y: f32,
9638 #[doc = "Current tracking status"]
9639 pub tracking_status: CameraTrackingStatusFlags,
9640 #[doc = "Current tracking mode"]
9641 pub tracking_mode: CameraTrackingMode,
9642 #[doc = "Defines location of target data"]
9643 pub target_data: CameraTrackingTargetData,
9644 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9645 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9646 pub camera_device_id: u8,
9647}
9648impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
9649 pub const ENCODED_LEN: usize = 32usize;
9650 pub const DEFAULT: Self = Self {
9651 point_x: 0.0_f32,
9652 point_y: 0.0_f32,
9653 radius: 0.0_f32,
9654 rec_top_x: 0.0_f32,
9655 rec_top_y: 0.0_f32,
9656 rec_bottom_x: 0.0_f32,
9657 rec_bottom_y: 0.0_f32,
9658 tracking_status: CameraTrackingStatusFlags::DEFAULT,
9659 tracking_mode: CameraTrackingMode::DEFAULT,
9660 target_data: CameraTrackingTargetData::DEFAULT,
9661 camera_device_id: 0_u8,
9662 };
9663 #[cfg(feature = "arbitrary")]
9664 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9665 use arbitrary::{Arbitrary, Unstructured};
9666 let mut buf = [0u8; 1024];
9667 rng.fill_bytes(&mut buf);
9668 let mut unstructured = Unstructured::new(&buf);
9669 Self::arbitrary(&mut unstructured).unwrap_or_default()
9670 }
9671}
9672impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
9673 fn default() -> Self {
9674 Self::DEFAULT.clone()
9675 }
9676}
9677impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
9678 type Message = MavMessage;
9679 const ID: u32 = 275u32;
9680 const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
9681 const EXTRA_CRC: u8 = 126u8;
9682 const ENCODED_LEN: usize = 32usize;
9683 fn deser(
9684 _version: MavlinkVersion,
9685 __input: &[u8],
9686 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9687 let avail_len = __input.len();
9688 let mut payload_buf = [0; Self::ENCODED_LEN];
9689 let mut buf = if avail_len < Self::ENCODED_LEN {
9690 payload_buf[0..avail_len].copy_from_slice(__input);
9691 Bytes::new(&payload_buf)
9692 } else {
9693 Bytes::new(__input)
9694 };
9695 let mut __struct = Self::default();
9696 __struct.point_x = buf.get_f32_le()?;
9697 __struct.point_y = buf.get_f32_le()?;
9698 __struct.radius = buf.get_f32_le()?;
9699 __struct.rec_top_x = buf.get_f32_le()?;
9700 __struct.rec_top_y = buf.get_f32_le()?;
9701 __struct.rec_bottom_x = buf.get_f32_le()?;
9702 __struct.rec_bottom_y = buf.get_f32_le()?;
9703 let tmp = buf.get_u8()?;
9704 __struct.tracking_status =
9705 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9706 enum_type: "CameraTrackingStatusFlags",
9707 value: tmp as u64,
9708 })?;
9709 let tmp = buf.get_u8()?;
9710 __struct.tracking_mode =
9711 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9712 enum_type: "CameraTrackingMode",
9713 value: tmp as u64,
9714 })?;
9715 let tmp = buf.get_u8()?;
9716 __struct.target_data =
9717 CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
9718 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9719 flag_type: "CameraTrackingTargetData",
9720 value: tmp as u64,
9721 })?;
9722 __struct.camera_device_id = buf.get_u8()?;
9723 Ok(__struct)
9724 }
9725 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9726 let mut __tmp = BytesMut::new(bytes);
9727 #[allow(clippy::absurd_extreme_comparisons)]
9728 #[allow(unused_comparisons)]
9729 if __tmp.remaining() < Self::ENCODED_LEN {
9730 panic!(
9731 "buffer is too small (need {} bytes, but got {})",
9732 Self::ENCODED_LEN,
9733 __tmp.remaining(),
9734 )
9735 }
9736 __tmp.put_f32_le(self.point_x);
9737 __tmp.put_f32_le(self.point_y);
9738 __tmp.put_f32_le(self.radius);
9739 __tmp.put_f32_le(self.rec_top_x);
9740 __tmp.put_f32_le(self.rec_top_y);
9741 __tmp.put_f32_le(self.rec_bottom_x);
9742 __tmp.put_f32_le(self.rec_bottom_y);
9743 __tmp.put_u8(self.tracking_status as u8);
9744 __tmp.put_u8(self.tracking_mode as u8);
9745 __tmp.put_u8(self.target_data.bits() as u8);
9746 if matches!(version, MavlinkVersion::V2) {
9747 __tmp.put_u8(self.camera_device_id);
9748 let len = __tmp.len();
9749 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9750 } else {
9751 __tmp.len()
9752 }
9753 }
9754}
9755#[doc = "Camera-IMU triggering and synchronisation message."]
9756#[doc = ""]
9757#[doc = "ID: 112"]
9758#[derive(Debug, Clone, PartialEq)]
9759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9761#[cfg_attr(feature = "ts", derive(TS))]
9762#[cfg_attr(feature = "ts", ts(export))]
9763pub struct CAMERA_TRIGGER_DATA {
9764 #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9765 pub time_usec: u64,
9766 #[doc = "Image frame sequence"]
9767 pub seq: u32,
9768}
9769impl CAMERA_TRIGGER_DATA {
9770 pub const ENCODED_LEN: usize = 12usize;
9771 pub const DEFAULT: Self = Self {
9772 time_usec: 0_u64,
9773 seq: 0_u32,
9774 };
9775 #[cfg(feature = "arbitrary")]
9776 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9777 use arbitrary::{Arbitrary, Unstructured};
9778 let mut buf = [0u8; 1024];
9779 rng.fill_bytes(&mut buf);
9780 let mut unstructured = Unstructured::new(&buf);
9781 Self::arbitrary(&mut unstructured).unwrap_or_default()
9782 }
9783}
9784impl Default for CAMERA_TRIGGER_DATA {
9785 fn default() -> Self {
9786 Self::DEFAULT.clone()
9787 }
9788}
9789impl MessageData for CAMERA_TRIGGER_DATA {
9790 type Message = MavMessage;
9791 const ID: u32 = 112u32;
9792 const NAME: &'static str = "CAMERA_TRIGGER";
9793 const EXTRA_CRC: u8 = 174u8;
9794 const ENCODED_LEN: usize = 12usize;
9795 fn deser(
9796 _version: MavlinkVersion,
9797 __input: &[u8],
9798 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9799 let avail_len = __input.len();
9800 let mut payload_buf = [0; Self::ENCODED_LEN];
9801 let mut buf = if avail_len < Self::ENCODED_LEN {
9802 payload_buf[0..avail_len].copy_from_slice(__input);
9803 Bytes::new(&payload_buf)
9804 } else {
9805 Bytes::new(__input)
9806 };
9807 let mut __struct = Self::default();
9808 __struct.time_usec = buf.get_u64_le()?;
9809 __struct.seq = buf.get_u32_le()?;
9810 Ok(__struct)
9811 }
9812 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9813 let mut __tmp = BytesMut::new(bytes);
9814 #[allow(clippy::absurd_extreme_comparisons)]
9815 #[allow(unused_comparisons)]
9816 if __tmp.remaining() < Self::ENCODED_LEN {
9817 panic!(
9818 "buffer is too small (need {} bytes, but got {})",
9819 Self::ENCODED_LEN,
9820 __tmp.remaining(),
9821 )
9822 }
9823 __tmp.put_u64_le(self.time_usec);
9824 __tmp.put_u32_le(self.seq);
9825 if matches!(version, MavlinkVersion::V2) {
9826 let len = __tmp.len();
9827 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9828 } else {
9829 __tmp.len()
9830 }
9831 }
9832}
9833#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
9834#[doc = ""]
9835#[doc = "ID: 387"]
9836#[derive(Debug, Clone, PartialEq)]
9837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9839#[cfg_attr(feature = "ts", derive(TS))]
9840#[cfg_attr(feature = "ts", ts(export))]
9841pub struct CANFD_FRAME_DATA {
9842 #[doc = "Frame ID"]
9843 pub id: u32,
9844 #[doc = "System ID."]
9845 pub target_system: u8,
9846 #[doc = "Component ID."]
9847 pub target_component: u8,
9848 #[doc = "bus number"]
9849 pub bus: u8,
9850 #[doc = "Frame length"]
9851 pub len: u8,
9852 #[doc = "Frame data"]
9853 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9854 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9855 pub data: [u8; 64],
9856}
9857impl CANFD_FRAME_DATA {
9858 pub const ENCODED_LEN: usize = 72usize;
9859 pub const DEFAULT: Self = Self {
9860 id: 0_u32,
9861 target_system: 0_u8,
9862 target_component: 0_u8,
9863 bus: 0_u8,
9864 len: 0_u8,
9865 data: [0_u8; 64usize],
9866 };
9867 #[cfg(feature = "arbitrary")]
9868 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9869 use arbitrary::{Arbitrary, Unstructured};
9870 let mut buf = [0u8; 1024];
9871 rng.fill_bytes(&mut buf);
9872 let mut unstructured = Unstructured::new(&buf);
9873 Self::arbitrary(&mut unstructured).unwrap_or_default()
9874 }
9875}
9876impl Default for CANFD_FRAME_DATA {
9877 fn default() -> Self {
9878 Self::DEFAULT.clone()
9879 }
9880}
9881impl MessageData for CANFD_FRAME_DATA {
9882 type Message = MavMessage;
9883 const ID: u32 = 387u32;
9884 const NAME: &'static str = "CANFD_FRAME";
9885 const EXTRA_CRC: u8 = 4u8;
9886 const ENCODED_LEN: usize = 72usize;
9887 fn deser(
9888 _version: MavlinkVersion,
9889 __input: &[u8],
9890 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9891 let avail_len = __input.len();
9892 let mut payload_buf = [0; Self::ENCODED_LEN];
9893 let mut buf = if avail_len < Self::ENCODED_LEN {
9894 payload_buf[0..avail_len].copy_from_slice(__input);
9895 Bytes::new(&payload_buf)
9896 } else {
9897 Bytes::new(__input)
9898 };
9899 let mut __struct = Self::default();
9900 __struct.id = buf.get_u32_le()?;
9901 __struct.target_system = buf.get_u8()?;
9902 __struct.target_component = buf.get_u8()?;
9903 __struct.bus = buf.get_u8()?;
9904 __struct.len = buf.get_u8()?;
9905 for v in &mut __struct.data {
9906 let val = buf.get_u8()?;
9907 *v = val;
9908 }
9909 Ok(__struct)
9910 }
9911 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9912 let mut __tmp = BytesMut::new(bytes);
9913 #[allow(clippy::absurd_extreme_comparisons)]
9914 #[allow(unused_comparisons)]
9915 if __tmp.remaining() < Self::ENCODED_LEN {
9916 panic!(
9917 "buffer is too small (need {} bytes, but got {})",
9918 Self::ENCODED_LEN,
9919 __tmp.remaining(),
9920 )
9921 }
9922 __tmp.put_u32_le(self.id);
9923 __tmp.put_u8(self.target_system);
9924 __tmp.put_u8(self.target_component);
9925 __tmp.put_u8(self.bus);
9926 __tmp.put_u8(self.len);
9927 for val in &self.data {
9928 __tmp.put_u8(*val);
9929 }
9930 if matches!(version, MavlinkVersion::V2) {
9931 let len = __tmp.len();
9932 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9933 } else {
9934 __tmp.len()
9935 }
9936 }
9937}
9938#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
9939#[doc = ""]
9940#[doc = "ID: 388"]
9941#[derive(Debug, Clone, PartialEq)]
9942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9944#[cfg_attr(feature = "ts", derive(TS))]
9945#[cfg_attr(feature = "ts", ts(export))]
9946pub struct CAN_FILTER_MODIFY_DATA {
9947 #[doc = "filter IDs, length num_ids"]
9948 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9949 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9950 pub ids: [u16; 16],
9951 #[doc = "System ID."]
9952 pub target_system: u8,
9953 #[doc = "Component ID."]
9954 pub target_component: u8,
9955 #[doc = "bus number"]
9956 pub bus: u8,
9957 #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
9958 pub operation: CanFilterOp,
9959 #[doc = "number of IDs in filter list"]
9960 pub num_ids: u8,
9961}
9962impl CAN_FILTER_MODIFY_DATA {
9963 pub const ENCODED_LEN: usize = 37usize;
9964 pub const DEFAULT: Self = Self {
9965 ids: [0_u16; 16usize],
9966 target_system: 0_u8,
9967 target_component: 0_u8,
9968 bus: 0_u8,
9969 operation: CanFilterOp::DEFAULT,
9970 num_ids: 0_u8,
9971 };
9972 #[cfg(feature = "arbitrary")]
9973 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9974 use arbitrary::{Arbitrary, Unstructured};
9975 let mut buf = [0u8; 1024];
9976 rng.fill_bytes(&mut buf);
9977 let mut unstructured = Unstructured::new(&buf);
9978 Self::arbitrary(&mut unstructured).unwrap_or_default()
9979 }
9980}
9981impl Default for CAN_FILTER_MODIFY_DATA {
9982 fn default() -> Self {
9983 Self::DEFAULT.clone()
9984 }
9985}
9986impl MessageData for CAN_FILTER_MODIFY_DATA {
9987 type Message = MavMessage;
9988 const ID: u32 = 388u32;
9989 const NAME: &'static str = "CAN_FILTER_MODIFY";
9990 const EXTRA_CRC: u8 = 8u8;
9991 const ENCODED_LEN: usize = 37usize;
9992 fn deser(
9993 _version: MavlinkVersion,
9994 __input: &[u8],
9995 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9996 let avail_len = __input.len();
9997 let mut payload_buf = [0; Self::ENCODED_LEN];
9998 let mut buf = if avail_len < Self::ENCODED_LEN {
9999 payload_buf[0..avail_len].copy_from_slice(__input);
10000 Bytes::new(&payload_buf)
10001 } else {
10002 Bytes::new(__input)
10003 };
10004 let mut __struct = Self::default();
10005 for v in &mut __struct.ids {
10006 let val = buf.get_u16_le()?;
10007 *v = val;
10008 }
10009 __struct.target_system = buf.get_u8()?;
10010 __struct.target_component = buf.get_u8()?;
10011 __struct.bus = buf.get_u8()?;
10012 let tmp = buf.get_u8()?;
10013 __struct.operation =
10014 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10015 enum_type: "CanFilterOp",
10016 value: tmp as u64,
10017 })?;
10018 __struct.num_ids = buf.get_u8()?;
10019 Ok(__struct)
10020 }
10021 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10022 let mut __tmp = BytesMut::new(bytes);
10023 #[allow(clippy::absurd_extreme_comparisons)]
10024 #[allow(unused_comparisons)]
10025 if __tmp.remaining() < Self::ENCODED_LEN {
10026 panic!(
10027 "buffer is too small (need {} bytes, but got {})",
10028 Self::ENCODED_LEN,
10029 __tmp.remaining(),
10030 )
10031 }
10032 for val in &self.ids {
10033 __tmp.put_u16_le(*val);
10034 }
10035 __tmp.put_u8(self.target_system);
10036 __tmp.put_u8(self.target_component);
10037 __tmp.put_u8(self.bus);
10038 __tmp.put_u8(self.operation as u8);
10039 __tmp.put_u8(self.num_ids);
10040 if matches!(version, MavlinkVersion::V2) {
10041 let len = __tmp.len();
10042 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10043 } else {
10044 __tmp.len()
10045 }
10046 }
10047}
10048#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
10049#[doc = ""]
10050#[doc = "ID: 386"]
10051#[derive(Debug, Clone, PartialEq)]
10052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10054#[cfg_attr(feature = "ts", derive(TS))]
10055#[cfg_attr(feature = "ts", ts(export))]
10056pub struct CAN_FRAME_DATA {
10057 #[doc = "Frame ID"]
10058 pub id: u32,
10059 #[doc = "System ID."]
10060 pub target_system: u8,
10061 #[doc = "Component ID."]
10062 pub target_component: u8,
10063 #[doc = "Bus number"]
10064 pub bus: u8,
10065 #[doc = "Frame length"]
10066 pub len: u8,
10067 #[doc = "Frame data"]
10068 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10069 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10070 pub data: [u8; 8],
10071}
10072impl CAN_FRAME_DATA {
10073 pub const ENCODED_LEN: usize = 16usize;
10074 pub const DEFAULT: Self = Self {
10075 id: 0_u32,
10076 target_system: 0_u8,
10077 target_component: 0_u8,
10078 bus: 0_u8,
10079 len: 0_u8,
10080 data: [0_u8; 8usize],
10081 };
10082 #[cfg(feature = "arbitrary")]
10083 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10084 use arbitrary::{Arbitrary, Unstructured};
10085 let mut buf = [0u8; 1024];
10086 rng.fill_bytes(&mut buf);
10087 let mut unstructured = Unstructured::new(&buf);
10088 Self::arbitrary(&mut unstructured).unwrap_or_default()
10089 }
10090}
10091impl Default for CAN_FRAME_DATA {
10092 fn default() -> Self {
10093 Self::DEFAULT.clone()
10094 }
10095}
10096impl MessageData for CAN_FRAME_DATA {
10097 type Message = MavMessage;
10098 const ID: u32 = 386u32;
10099 const NAME: &'static str = "CAN_FRAME";
10100 const EXTRA_CRC: u8 = 132u8;
10101 const ENCODED_LEN: usize = 16usize;
10102 fn deser(
10103 _version: MavlinkVersion,
10104 __input: &[u8],
10105 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10106 let avail_len = __input.len();
10107 let mut payload_buf = [0; Self::ENCODED_LEN];
10108 let mut buf = if avail_len < Self::ENCODED_LEN {
10109 payload_buf[0..avail_len].copy_from_slice(__input);
10110 Bytes::new(&payload_buf)
10111 } else {
10112 Bytes::new(__input)
10113 };
10114 let mut __struct = Self::default();
10115 __struct.id = buf.get_u32_le()?;
10116 __struct.target_system = buf.get_u8()?;
10117 __struct.target_component = buf.get_u8()?;
10118 __struct.bus = buf.get_u8()?;
10119 __struct.len = buf.get_u8()?;
10120 for v in &mut __struct.data {
10121 let val = buf.get_u8()?;
10122 *v = val;
10123 }
10124 Ok(__struct)
10125 }
10126 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10127 let mut __tmp = BytesMut::new(bytes);
10128 #[allow(clippy::absurd_extreme_comparisons)]
10129 #[allow(unused_comparisons)]
10130 if __tmp.remaining() < Self::ENCODED_LEN {
10131 panic!(
10132 "buffer is too small (need {} bytes, but got {})",
10133 Self::ENCODED_LEN,
10134 __tmp.remaining(),
10135 )
10136 }
10137 __tmp.put_u32_le(self.id);
10138 __tmp.put_u8(self.target_system);
10139 __tmp.put_u8(self.target_component);
10140 __tmp.put_u8(self.bus);
10141 __tmp.put_u8(self.len);
10142 for val in &self.data {
10143 __tmp.put_u8(*val);
10144 }
10145 if matches!(version, MavlinkVersion::V2) {
10146 let len = __tmp.len();
10147 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10148 } else {
10149 __tmp.len()
10150 }
10151 }
10152}
10153#[doc = "Configure cellular modems. This message is re-emitted as an acknowledgement by the modem. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
10154#[doc = ""]
10155#[doc = "ID: 336"]
10156#[derive(Debug, Clone, PartialEq)]
10157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10159#[cfg_attr(feature = "ts", derive(TS))]
10160#[cfg_attr(feature = "ts", ts(export))]
10161pub struct CELLULAR_CONFIG_DATA {
10162 #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
10163 pub enable_lte: u8,
10164 #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
10165 pub enable_pin: u8,
10166 #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
10167 #[cfg_attr(feature = "ts", ts(type = "string"))]
10168 pub pin: CharArray<16>,
10169 #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
10170 #[cfg_attr(feature = "ts", ts(type = "string"))]
10171 pub new_pin: CharArray<16>,
10172 #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
10173 #[cfg_attr(feature = "ts", ts(type = "string"))]
10174 pub apn: CharArray<32>,
10175 #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
10176 #[cfg_attr(feature = "ts", ts(type = "string"))]
10177 pub puk: CharArray<16>,
10178 #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
10179 pub roaming: u8,
10180 #[doc = "Message acceptance response (sent back to GS)."]
10181 pub response: CellularConfigResponse,
10182}
10183impl CELLULAR_CONFIG_DATA {
10184 pub const ENCODED_LEN: usize = 84usize;
10185 pub const DEFAULT: Self = Self {
10186 enable_lte: 0_u8,
10187 enable_pin: 0_u8,
10188 pin: CharArray::new([0_u8; 16usize]),
10189 new_pin: CharArray::new([0_u8; 16usize]),
10190 apn: CharArray::new([0_u8; 32usize]),
10191 puk: CharArray::new([0_u8; 16usize]),
10192 roaming: 0_u8,
10193 response: CellularConfigResponse::DEFAULT,
10194 };
10195 #[cfg(feature = "arbitrary")]
10196 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10197 use arbitrary::{Arbitrary, Unstructured};
10198 let mut buf = [0u8; 1024];
10199 rng.fill_bytes(&mut buf);
10200 let mut unstructured = Unstructured::new(&buf);
10201 Self::arbitrary(&mut unstructured).unwrap_or_default()
10202 }
10203}
10204impl Default for CELLULAR_CONFIG_DATA {
10205 fn default() -> Self {
10206 Self::DEFAULT.clone()
10207 }
10208}
10209impl MessageData for CELLULAR_CONFIG_DATA {
10210 type Message = MavMessage;
10211 const ID: u32 = 336u32;
10212 const NAME: &'static str = "CELLULAR_CONFIG";
10213 const EXTRA_CRC: u8 = 245u8;
10214 const ENCODED_LEN: usize = 84usize;
10215 fn deser(
10216 _version: MavlinkVersion,
10217 __input: &[u8],
10218 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10219 let avail_len = __input.len();
10220 let mut payload_buf = [0; Self::ENCODED_LEN];
10221 let mut buf = if avail_len < Self::ENCODED_LEN {
10222 payload_buf[0..avail_len].copy_from_slice(__input);
10223 Bytes::new(&payload_buf)
10224 } else {
10225 Bytes::new(__input)
10226 };
10227 let mut __struct = Self::default();
10228 __struct.enable_lte = buf.get_u8()?;
10229 __struct.enable_pin = buf.get_u8()?;
10230 let mut tmp = [0_u8; 16usize];
10231 for v in &mut tmp {
10232 *v = buf.get_u8()?;
10233 }
10234 __struct.pin = CharArray::new(tmp);
10235 let mut tmp = [0_u8; 16usize];
10236 for v in &mut tmp {
10237 *v = buf.get_u8()?;
10238 }
10239 __struct.new_pin = CharArray::new(tmp);
10240 let mut tmp = [0_u8; 32usize];
10241 for v in &mut tmp {
10242 *v = buf.get_u8()?;
10243 }
10244 __struct.apn = CharArray::new(tmp);
10245 let mut tmp = [0_u8; 16usize];
10246 for v in &mut tmp {
10247 *v = buf.get_u8()?;
10248 }
10249 __struct.puk = CharArray::new(tmp);
10250 __struct.roaming = buf.get_u8()?;
10251 let tmp = buf.get_u8()?;
10252 __struct.response =
10253 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10254 enum_type: "CellularConfigResponse",
10255 value: tmp as u64,
10256 })?;
10257 Ok(__struct)
10258 }
10259 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10260 let mut __tmp = BytesMut::new(bytes);
10261 #[allow(clippy::absurd_extreme_comparisons)]
10262 #[allow(unused_comparisons)]
10263 if __tmp.remaining() < Self::ENCODED_LEN {
10264 panic!(
10265 "buffer is too small (need {} bytes, but got {})",
10266 Self::ENCODED_LEN,
10267 __tmp.remaining(),
10268 )
10269 }
10270 __tmp.put_u8(self.enable_lte);
10271 __tmp.put_u8(self.enable_pin);
10272 for val in &self.pin {
10273 __tmp.put_u8(*val);
10274 }
10275 for val in &self.new_pin {
10276 __tmp.put_u8(*val);
10277 }
10278 for val in &self.apn {
10279 __tmp.put_u8(*val);
10280 }
10281 for val in &self.puk {
10282 __tmp.put_u8(*val);
10283 }
10284 __tmp.put_u8(self.roaming);
10285 __tmp.put_u8(self.response as u8);
10286 if matches!(version, MavlinkVersion::V2) {
10287 let len = __tmp.len();
10288 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10289 } else {
10290 __tmp.len()
10291 }
10292 }
10293}
10294#[doc = "Report current used cellular network status."]
10295#[doc = ""]
10296#[doc = "ID: 334"]
10297#[derive(Debug, Clone, PartialEq)]
10298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10300#[cfg_attr(feature = "ts", derive(TS))]
10301#[cfg_attr(feature = "ts", ts(export))]
10302pub struct CELLULAR_STATUS_DATA {
10303 #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
10304 pub mcc: u16,
10305 #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
10306 pub mnc: u16,
10307 #[doc = "Location area code. If unknown, set to 0"]
10308 pub lac: u16,
10309 #[doc = "Cellular modem status"]
10310 pub status: CellularStatusFlag,
10311 #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
10312 pub failure_reason: CellularNetworkFailedReason,
10313 #[doc = "Cellular network radio type: gsm, cdma, lte..."]
10314 pub mavtype: CellularNetworkRadioType,
10315 #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
10316 pub quality: u8,
10317}
10318impl CELLULAR_STATUS_DATA {
10319 pub const ENCODED_LEN: usize = 10usize;
10320 pub const DEFAULT: Self = Self {
10321 mcc: 0_u16,
10322 mnc: 0_u16,
10323 lac: 0_u16,
10324 status: CellularStatusFlag::DEFAULT,
10325 failure_reason: CellularNetworkFailedReason::DEFAULT,
10326 mavtype: CellularNetworkRadioType::DEFAULT,
10327 quality: 0_u8,
10328 };
10329 #[cfg(feature = "arbitrary")]
10330 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10331 use arbitrary::{Arbitrary, Unstructured};
10332 let mut buf = [0u8; 1024];
10333 rng.fill_bytes(&mut buf);
10334 let mut unstructured = Unstructured::new(&buf);
10335 Self::arbitrary(&mut unstructured).unwrap_or_default()
10336 }
10337}
10338impl Default for CELLULAR_STATUS_DATA {
10339 fn default() -> Self {
10340 Self::DEFAULT.clone()
10341 }
10342}
10343impl MessageData for CELLULAR_STATUS_DATA {
10344 type Message = MavMessage;
10345 const ID: u32 = 334u32;
10346 const NAME: &'static str = "CELLULAR_STATUS";
10347 const EXTRA_CRC: u8 = 72u8;
10348 const ENCODED_LEN: usize = 10usize;
10349 fn deser(
10350 _version: MavlinkVersion,
10351 __input: &[u8],
10352 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10353 let avail_len = __input.len();
10354 let mut payload_buf = [0; Self::ENCODED_LEN];
10355 let mut buf = if avail_len < Self::ENCODED_LEN {
10356 payload_buf[0..avail_len].copy_from_slice(__input);
10357 Bytes::new(&payload_buf)
10358 } else {
10359 Bytes::new(__input)
10360 };
10361 let mut __struct = Self::default();
10362 __struct.mcc = buf.get_u16_le()?;
10363 __struct.mnc = buf.get_u16_le()?;
10364 __struct.lac = buf.get_u16_le()?;
10365 let tmp = buf.get_u8()?;
10366 __struct.status =
10367 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10368 enum_type: "CellularStatusFlag",
10369 value: tmp as u64,
10370 })?;
10371 let tmp = buf.get_u8()?;
10372 __struct.failure_reason =
10373 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10374 enum_type: "CellularNetworkFailedReason",
10375 value: tmp as u64,
10376 })?;
10377 let tmp = buf.get_u8()?;
10378 __struct.mavtype =
10379 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10380 enum_type: "CellularNetworkRadioType",
10381 value: tmp as u64,
10382 })?;
10383 __struct.quality = buf.get_u8()?;
10384 Ok(__struct)
10385 }
10386 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10387 let mut __tmp = BytesMut::new(bytes);
10388 #[allow(clippy::absurd_extreme_comparisons)]
10389 #[allow(unused_comparisons)]
10390 if __tmp.remaining() < Self::ENCODED_LEN {
10391 panic!(
10392 "buffer is too small (need {} bytes, but got {})",
10393 Self::ENCODED_LEN,
10394 __tmp.remaining(),
10395 )
10396 }
10397 __tmp.put_u16_le(self.mcc);
10398 __tmp.put_u16_le(self.mnc);
10399 __tmp.put_u16_le(self.lac);
10400 __tmp.put_u8(self.status as u8);
10401 __tmp.put_u8(self.failure_reason as u8);
10402 __tmp.put_u8(self.mavtype as u8);
10403 __tmp.put_u8(self.quality);
10404 if matches!(version, MavlinkVersion::V2) {
10405 let len = __tmp.len();
10406 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10407 } else {
10408 __tmp.len()
10409 }
10410 }
10411}
10412#[doc = "Request to control this MAV."]
10413#[doc = ""]
10414#[doc = "ID: 5"]
10415#[derive(Debug, Clone, PartialEq)]
10416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10418#[cfg_attr(feature = "ts", derive(TS))]
10419#[cfg_attr(feature = "ts", ts(export))]
10420pub struct CHANGE_OPERATOR_CONTROL_DATA {
10421 #[doc = "System the GCS requests control for"]
10422 pub target_system: u8,
10423 #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
10424 pub control_request: u8,
10425 #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
10426 pub version: u8,
10427 #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
10428 #[cfg_attr(feature = "ts", ts(type = "string"))]
10429 pub passkey: CharArray<25>,
10430}
10431impl CHANGE_OPERATOR_CONTROL_DATA {
10432 pub const ENCODED_LEN: usize = 28usize;
10433 pub const DEFAULT: Self = Self {
10434 target_system: 0_u8,
10435 control_request: 0_u8,
10436 version: 0_u8,
10437 passkey: CharArray::new([0_u8; 25usize]),
10438 };
10439 #[cfg(feature = "arbitrary")]
10440 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10441 use arbitrary::{Arbitrary, Unstructured};
10442 let mut buf = [0u8; 1024];
10443 rng.fill_bytes(&mut buf);
10444 let mut unstructured = Unstructured::new(&buf);
10445 Self::arbitrary(&mut unstructured).unwrap_or_default()
10446 }
10447}
10448impl Default for CHANGE_OPERATOR_CONTROL_DATA {
10449 fn default() -> Self {
10450 Self::DEFAULT.clone()
10451 }
10452}
10453impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
10454 type Message = MavMessage;
10455 const ID: u32 = 5u32;
10456 const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
10457 const EXTRA_CRC: u8 = 217u8;
10458 const ENCODED_LEN: usize = 28usize;
10459 fn deser(
10460 _version: MavlinkVersion,
10461 __input: &[u8],
10462 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10463 let avail_len = __input.len();
10464 let mut payload_buf = [0; Self::ENCODED_LEN];
10465 let mut buf = if avail_len < Self::ENCODED_LEN {
10466 payload_buf[0..avail_len].copy_from_slice(__input);
10467 Bytes::new(&payload_buf)
10468 } else {
10469 Bytes::new(__input)
10470 };
10471 let mut __struct = Self::default();
10472 __struct.target_system = buf.get_u8()?;
10473 __struct.control_request = buf.get_u8()?;
10474 __struct.version = buf.get_u8()?;
10475 let mut tmp = [0_u8; 25usize];
10476 for v in &mut tmp {
10477 *v = buf.get_u8()?;
10478 }
10479 __struct.passkey = CharArray::new(tmp);
10480 Ok(__struct)
10481 }
10482 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10483 let mut __tmp = BytesMut::new(bytes);
10484 #[allow(clippy::absurd_extreme_comparisons)]
10485 #[allow(unused_comparisons)]
10486 if __tmp.remaining() < Self::ENCODED_LEN {
10487 panic!(
10488 "buffer is too small (need {} bytes, but got {})",
10489 Self::ENCODED_LEN,
10490 __tmp.remaining(),
10491 )
10492 }
10493 __tmp.put_u8(self.target_system);
10494 __tmp.put_u8(self.control_request);
10495 __tmp.put_u8(self.version);
10496 for val in &self.passkey {
10497 __tmp.put_u8(*val);
10498 }
10499 if matches!(version, MavlinkVersion::V2) {
10500 let len = __tmp.len();
10501 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10502 } else {
10503 __tmp.len()
10504 }
10505 }
10506}
10507#[doc = "Accept / deny control of this MAV."]
10508#[doc = ""]
10509#[doc = "ID: 6"]
10510#[derive(Debug, Clone, PartialEq)]
10511#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10512#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10513#[cfg_attr(feature = "ts", derive(TS))]
10514#[cfg_attr(feature = "ts", ts(export))]
10515pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
10516 #[doc = "ID of the GCS this message"]
10517 pub gcs_system_id: u8,
10518 #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
10519 pub control_request: u8,
10520 #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
10521 pub ack: u8,
10522}
10523impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
10524 pub const ENCODED_LEN: usize = 3usize;
10525 pub const DEFAULT: Self = Self {
10526 gcs_system_id: 0_u8,
10527 control_request: 0_u8,
10528 ack: 0_u8,
10529 };
10530 #[cfg(feature = "arbitrary")]
10531 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10532 use arbitrary::{Arbitrary, Unstructured};
10533 let mut buf = [0u8; 1024];
10534 rng.fill_bytes(&mut buf);
10535 let mut unstructured = Unstructured::new(&buf);
10536 Self::arbitrary(&mut unstructured).unwrap_or_default()
10537 }
10538}
10539impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
10540 fn default() -> Self {
10541 Self::DEFAULT.clone()
10542 }
10543}
10544impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
10545 type Message = MavMessage;
10546 const ID: u32 = 6u32;
10547 const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
10548 const EXTRA_CRC: u8 = 104u8;
10549 const ENCODED_LEN: usize = 3usize;
10550 fn deser(
10551 _version: MavlinkVersion,
10552 __input: &[u8],
10553 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10554 let avail_len = __input.len();
10555 let mut payload_buf = [0; Self::ENCODED_LEN];
10556 let mut buf = if avail_len < Self::ENCODED_LEN {
10557 payload_buf[0..avail_len].copy_from_slice(__input);
10558 Bytes::new(&payload_buf)
10559 } else {
10560 Bytes::new(__input)
10561 };
10562 let mut __struct = Self::default();
10563 __struct.gcs_system_id = buf.get_u8()?;
10564 __struct.control_request = buf.get_u8()?;
10565 __struct.ack = buf.get_u8()?;
10566 Ok(__struct)
10567 }
10568 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10569 let mut __tmp = BytesMut::new(bytes);
10570 #[allow(clippy::absurd_extreme_comparisons)]
10571 #[allow(unused_comparisons)]
10572 if __tmp.remaining() < Self::ENCODED_LEN {
10573 panic!(
10574 "buffer is too small (need {} bytes, but got {})",
10575 Self::ENCODED_LEN,
10576 __tmp.remaining(),
10577 )
10578 }
10579 __tmp.put_u8(self.gcs_system_id);
10580 __tmp.put_u8(self.control_request);
10581 __tmp.put_u8(self.ack);
10582 if matches!(version, MavlinkVersion::V2) {
10583 let len = __tmp.len();
10584 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10585 } else {
10586 __tmp.len()
10587 }
10588 }
10589}
10590#[doc = "Information about a potential collision."]
10591#[doc = ""]
10592#[doc = "ID: 247"]
10593#[derive(Debug, Clone, PartialEq)]
10594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10596#[cfg_attr(feature = "ts", derive(TS))]
10597#[cfg_attr(feature = "ts", ts(export))]
10598pub struct COLLISION_DATA {
10599 #[doc = "Unique identifier, domain based on src field"]
10600 pub id: u32,
10601 #[doc = "Estimated time until collision occurs"]
10602 pub time_to_minimum_delta: f32,
10603 #[doc = "Closest vertical distance between vehicle and object"]
10604 pub altitude_minimum_delta: f32,
10605 #[doc = "Closest horizontal distance between vehicle and object"]
10606 pub horizontal_minimum_delta: f32,
10607 #[doc = "Collision data source"]
10608 pub src: MavCollisionSrc,
10609 #[doc = "Action that is being taken to avoid this collision"]
10610 pub action: MavCollisionAction,
10611 #[doc = "How concerned the aircraft is about this collision"]
10612 pub threat_level: MavCollisionThreatLevel,
10613}
10614impl COLLISION_DATA {
10615 pub const ENCODED_LEN: usize = 19usize;
10616 pub const DEFAULT: Self = Self {
10617 id: 0_u32,
10618 time_to_minimum_delta: 0.0_f32,
10619 altitude_minimum_delta: 0.0_f32,
10620 horizontal_minimum_delta: 0.0_f32,
10621 src: MavCollisionSrc::DEFAULT,
10622 action: MavCollisionAction::DEFAULT,
10623 threat_level: MavCollisionThreatLevel::DEFAULT,
10624 };
10625 #[cfg(feature = "arbitrary")]
10626 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10627 use arbitrary::{Arbitrary, Unstructured};
10628 let mut buf = [0u8; 1024];
10629 rng.fill_bytes(&mut buf);
10630 let mut unstructured = Unstructured::new(&buf);
10631 Self::arbitrary(&mut unstructured).unwrap_or_default()
10632 }
10633}
10634impl Default for COLLISION_DATA {
10635 fn default() -> Self {
10636 Self::DEFAULT.clone()
10637 }
10638}
10639impl MessageData for COLLISION_DATA {
10640 type Message = MavMessage;
10641 const ID: u32 = 247u32;
10642 const NAME: &'static str = "COLLISION";
10643 const EXTRA_CRC: u8 = 81u8;
10644 const ENCODED_LEN: usize = 19usize;
10645 fn deser(
10646 _version: MavlinkVersion,
10647 __input: &[u8],
10648 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10649 let avail_len = __input.len();
10650 let mut payload_buf = [0; Self::ENCODED_LEN];
10651 let mut buf = if avail_len < Self::ENCODED_LEN {
10652 payload_buf[0..avail_len].copy_from_slice(__input);
10653 Bytes::new(&payload_buf)
10654 } else {
10655 Bytes::new(__input)
10656 };
10657 let mut __struct = Self::default();
10658 __struct.id = buf.get_u32_le()?;
10659 __struct.time_to_minimum_delta = buf.get_f32_le()?;
10660 __struct.altitude_minimum_delta = buf.get_f32_le()?;
10661 __struct.horizontal_minimum_delta = buf.get_f32_le()?;
10662 let tmp = buf.get_u8()?;
10663 __struct.src =
10664 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10665 enum_type: "MavCollisionSrc",
10666 value: tmp as u64,
10667 })?;
10668 let tmp = buf.get_u8()?;
10669 __struct.action =
10670 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10671 enum_type: "MavCollisionAction",
10672 value: tmp as u64,
10673 })?;
10674 let tmp = buf.get_u8()?;
10675 __struct.threat_level =
10676 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10677 enum_type: "MavCollisionThreatLevel",
10678 value: tmp as u64,
10679 })?;
10680 Ok(__struct)
10681 }
10682 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10683 let mut __tmp = BytesMut::new(bytes);
10684 #[allow(clippy::absurd_extreme_comparisons)]
10685 #[allow(unused_comparisons)]
10686 if __tmp.remaining() < Self::ENCODED_LEN {
10687 panic!(
10688 "buffer is too small (need {} bytes, but got {})",
10689 Self::ENCODED_LEN,
10690 __tmp.remaining(),
10691 )
10692 }
10693 __tmp.put_u32_le(self.id);
10694 __tmp.put_f32_le(self.time_to_minimum_delta);
10695 __tmp.put_f32_le(self.altitude_minimum_delta);
10696 __tmp.put_f32_le(self.horizontal_minimum_delta);
10697 __tmp.put_u8(self.src as u8);
10698 __tmp.put_u8(self.action as u8);
10699 __tmp.put_u8(self.threat_level as u8);
10700 if matches!(version, MavlinkVersion::V2) {
10701 let len = __tmp.len();
10702 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10703 } else {
10704 __tmp.len()
10705 }
10706 }
10707}
10708#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
10709#[doc = ""]
10710#[doc = "ID: 77"]
10711#[derive(Debug, Clone, PartialEq)]
10712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10714#[cfg_attr(feature = "ts", derive(TS))]
10715#[cfg_attr(feature = "ts", ts(export))]
10716pub struct COMMAND_ACK_DATA {
10717 #[doc = "Command ID (of acknowledged command)."]
10718 pub command: MavCmd,
10719 #[doc = "Result of command."]
10720 pub result: MavResult,
10721 #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
10722 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10723 pub progress: u8,
10724 #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
10725 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10726 pub result_param2: i32,
10727 #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
10728 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10729 pub target_system: u8,
10730 #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
10731 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10732 pub target_component: u8,
10733}
10734impl COMMAND_ACK_DATA {
10735 pub const ENCODED_LEN: usize = 10usize;
10736 pub const DEFAULT: Self = Self {
10737 command: MavCmd::DEFAULT,
10738 result: MavResult::DEFAULT,
10739 progress: 0_u8,
10740 result_param2: 0_i32,
10741 target_system: 0_u8,
10742 target_component: 0_u8,
10743 };
10744 #[cfg(feature = "arbitrary")]
10745 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10746 use arbitrary::{Arbitrary, Unstructured};
10747 let mut buf = [0u8; 1024];
10748 rng.fill_bytes(&mut buf);
10749 let mut unstructured = Unstructured::new(&buf);
10750 Self::arbitrary(&mut unstructured).unwrap_or_default()
10751 }
10752}
10753impl Default for COMMAND_ACK_DATA {
10754 fn default() -> Self {
10755 Self::DEFAULT.clone()
10756 }
10757}
10758impl MessageData for COMMAND_ACK_DATA {
10759 type Message = MavMessage;
10760 const ID: u32 = 77u32;
10761 const NAME: &'static str = "COMMAND_ACK";
10762 const EXTRA_CRC: u8 = 143u8;
10763 const ENCODED_LEN: usize = 10usize;
10764 fn deser(
10765 _version: MavlinkVersion,
10766 __input: &[u8],
10767 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10768 let avail_len = __input.len();
10769 let mut payload_buf = [0; Self::ENCODED_LEN];
10770 let mut buf = if avail_len < Self::ENCODED_LEN {
10771 payload_buf[0..avail_len].copy_from_slice(__input);
10772 Bytes::new(&payload_buf)
10773 } else {
10774 Bytes::new(__input)
10775 };
10776 let mut __struct = Self::default();
10777 let tmp = buf.get_u16_le()?;
10778 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10779 ::mavlink_core::error::ParserError::InvalidEnum {
10780 enum_type: "MavCmd",
10781 value: tmp as u64,
10782 },
10783 )?;
10784 let tmp = buf.get_u8()?;
10785 __struct.result =
10786 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10787 enum_type: "MavResult",
10788 value: tmp as u64,
10789 })?;
10790 __struct.progress = buf.get_u8()?;
10791 __struct.result_param2 = buf.get_i32_le()?;
10792 __struct.target_system = buf.get_u8()?;
10793 __struct.target_component = buf.get_u8()?;
10794 Ok(__struct)
10795 }
10796 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10797 let mut __tmp = BytesMut::new(bytes);
10798 #[allow(clippy::absurd_extreme_comparisons)]
10799 #[allow(unused_comparisons)]
10800 if __tmp.remaining() < Self::ENCODED_LEN {
10801 panic!(
10802 "buffer is too small (need {} bytes, but got {})",
10803 Self::ENCODED_LEN,
10804 __tmp.remaining(),
10805 )
10806 }
10807 __tmp.put_u16_le(self.command as u16);
10808 __tmp.put_u8(self.result as u8);
10809 if matches!(version, MavlinkVersion::V2) {
10810 __tmp.put_u8(self.progress);
10811 __tmp.put_i32_le(self.result_param2);
10812 __tmp.put_u8(self.target_system);
10813 __tmp.put_u8(self.target_component);
10814 let len = __tmp.len();
10815 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10816 } else {
10817 __tmp.len()
10818 }
10819 }
10820}
10821#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
10822#[doc = ""]
10823#[doc = "ID: 80"]
10824#[derive(Debug, Clone, PartialEq)]
10825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10827#[cfg_attr(feature = "ts", derive(TS))]
10828#[cfg_attr(feature = "ts", ts(export))]
10829pub struct COMMAND_CANCEL_DATA {
10830 #[doc = "Command ID (of command to cancel)."]
10831 pub command: MavCmd,
10832 #[doc = "System executing long running command. Should not be broadcast (0)."]
10833 pub target_system: u8,
10834 #[doc = "Component executing long running command."]
10835 pub target_component: u8,
10836}
10837impl COMMAND_CANCEL_DATA {
10838 pub const ENCODED_LEN: usize = 4usize;
10839 pub const DEFAULT: Self = Self {
10840 command: MavCmd::DEFAULT,
10841 target_system: 0_u8,
10842 target_component: 0_u8,
10843 };
10844 #[cfg(feature = "arbitrary")]
10845 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10846 use arbitrary::{Arbitrary, Unstructured};
10847 let mut buf = [0u8; 1024];
10848 rng.fill_bytes(&mut buf);
10849 let mut unstructured = Unstructured::new(&buf);
10850 Self::arbitrary(&mut unstructured).unwrap_or_default()
10851 }
10852}
10853impl Default for COMMAND_CANCEL_DATA {
10854 fn default() -> Self {
10855 Self::DEFAULT.clone()
10856 }
10857}
10858impl MessageData for COMMAND_CANCEL_DATA {
10859 type Message = MavMessage;
10860 const ID: u32 = 80u32;
10861 const NAME: &'static str = "COMMAND_CANCEL";
10862 const EXTRA_CRC: u8 = 14u8;
10863 const ENCODED_LEN: usize = 4usize;
10864 fn deser(
10865 _version: MavlinkVersion,
10866 __input: &[u8],
10867 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10868 let avail_len = __input.len();
10869 let mut payload_buf = [0; Self::ENCODED_LEN];
10870 let mut buf = if avail_len < Self::ENCODED_LEN {
10871 payload_buf[0..avail_len].copy_from_slice(__input);
10872 Bytes::new(&payload_buf)
10873 } else {
10874 Bytes::new(__input)
10875 };
10876 let mut __struct = Self::default();
10877 let tmp = buf.get_u16_le()?;
10878 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10879 ::mavlink_core::error::ParserError::InvalidEnum {
10880 enum_type: "MavCmd",
10881 value: tmp as u64,
10882 },
10883 )?;
10884 __struct.target_system = buf.get_u8()?;
10885 __struct.target_component = buf.get_u8()?;
10886 Ok(__struct)
10887 }
10888 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10889 let mut __tmp = BytesMut::new(bytes);
10890 #[allow(clippy::absurd_extreme_comparisons)]
10891 #[allow(unused_comparisons)]
10892 if __tmp.remaining() < Self::ENCODED_LEN {
10893 panic!(
10894 "buffer is too small (need {} bytes, but got {})",
10895 Self::ENCODED_LEN,
10896 __tmp.remaining(),
10897 )
10898 }
10899 __tmp.put_u16_le(self.command as u16);
10900 __tmp.put_u8(self.target_system);
10901 __tmp.put_u8(self.target_component);
10902 if matches!(version, MavlinkVersion::V2) {
10903 let len = __tmp.len();
10904 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10905 } else {
10906 __tmp.len()
10907 }
10908 }
10909}
10910#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
10911#[doc = ""]
10912#[doc = "ID: 75"]
10913#[derive(Debug, Clone, PartialEq)]
10914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10916#[cfg_attr(feature = "ts", derive(TS))]
10917#[cfg_attr(feature = "ts", ts(export))]
10918pub struct COMMAND_INT_DATA {
10919 #[doc = "PARAM1, see MAV_CMD enum"]
10920 pub param1: f32,
10921 #[doc = "PARAM2, see MAV_CMD enum"]
10922 pub param2: f32,
10923 #[doc = "PARAM3, see MAV_CMD enum"]
10924 pub param3: f32,
10925 #[doc = "PARAM4, see MAV_CMD enum"]
10926 pub param4: f32,
10927 #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
10928 pub x: i32,
10929 #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
10930 pub y: i32,
10931 #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
10932 pub z: f32,
10933 #[doc = "The scheduled action for the mission item."]
10934 pub command: MavCmd,
10935 #[doc = "System ID"]
10936 pub target_system: u8,
10937 #[doc = "Component ID"]
10938 pub target_component: u8,
10939 #[doc = "The coordinate system of the COMMAND."]
10940 pub frame: MavFrame,
10941 #[doc = "Not used."]
10942 pub current: u8,
10943 #[doc = "Not used (set 0)."]
10944 pub autocontinue: u8,
10945}
10946impl COMMAND_INT_DATA {
10947 pub const ENCODED_LEN: usize = 35usize;
10948 pub const DEFAULT: Self = Self {
10949 param1: 0.0_f32,
10950 param2: 0.0_f32,
10951 param3: 0.0_f32,
10952 param4: 0.0_f32,
10953 x: 0_i32,
10954 y: 0_i32,
10955 z: 0.0_f32,
10956 command: MavCmd::DEFAULT,
10957 target_system: 0_u8,
10958 target_component: 0_u8,
10959 frame: MavFrame::DEFAULT,
10960 current: 0_u8,
10961 autocontinue: 0_u8,
10962 };
10963 #[cfg(feature = "arbitrary")]
10964 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10965 use arbitrary::{Arbitrary, Unstructured};
10966 let mut buf = [0u8; 1024];
10967 rng.fill_bytes(&mut buf);
10968 let mut unstructured = Unstructured::new(&buf);
10969 Self::arbitrary(&mut unstructured).unwrap_or_default()
10970 }
10971}
10972impl Default for COMMAND_INT_DATA {
10973 fn default() -> Self {
10974 Self::DEFAULT.clone()
10975 }
10976}
10977impl MessageData for COMMAND_INT_DATA {
10978 type Message = MavMessage;
10979 const ID: u32 = 75u32;
10980 const NAME: &'static str = "COMMAND_INT";
10981 const EXTRA_CRC: u8 = 158u8;
10982 const ENCODED_LEN: usize = 35usize;
10983 fn deser(
10984 _version: MavlinkVersion,
10985 __input: &[u8],
10986 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10987 let avail_len = __input.len();
10988 let mut payload_buf = [0; Self::ENCODED_LEN];
10989 let mut buf = if avail_len < Self::ENCODED_LEN {
10990 payload_buf[0..avail_len].copy_from_slice(__input);
10991 Bytes::new(&payload_buf)
10992 } else {
10993 Bytes::new(__input)
10994 };
10995 let mut __struct = Self::default();
10996 __struct.param1 = buf.get_f32_le()?;
10997 __struct.param2 = buf.get_f32_le()?;
10998 __struct.param3 = buf.get_f32_le()?;
10999 __struct.param4 = buf.get_f32_le()?;
11000 __struct.x = buf.get_i32_le()?;
11001 __struct.y = buf.get_i32_le()?;
11002 __struct.z = buf.get_f32_le()?;
11003 let tmp = buf.get_u16_le()?;
11004 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11005 ::mavlink_core::error::ParserError::InvalidEnum {
11006 enum_type: "MavCmd",
11007 value: tmp as u64,
11008 },
11009 )?;
11010 __struct.target_system = buf.get_u8()?;
11011 __struct.target_component = buf.get_u8()?;
11012 let tmp = buf.get_u8()?;
11013 __struct.frame =
11014 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11015 enum_type: "MavFrame",
11016 value: tmp as u64,
11017 })?;
11018 __struct.current = buf.get_u8()?;
11019 __struct.autocontinue = buf.get_u8()?;
11020 Ok(__struct)
11021 }
11022 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11023 let mut __tmp = BytesMut::new(bytes);
11024 #[allow(clippy::absurd_extreme_comparisons)]
11025 #[allow(unused_comparisons)]
11026 if __tmp.remaining() < Self::ENCODED_LEN {
11027 panic!(
11028 "buffer is too small (need {} bytes, but got {})",
11029 Self::ENCODED_LEN,
11030 __tmp.remaining(),
11031 )
11032 }
11033 __tmp.put_f32_le(self.param1);
11034 __tmp.put_f32_le(self.param2);
11035 __tmp.put_f32_le(self.param3);
11036 __tmp.put_f32_le(self.param4);
11037 __tmp.put_i32_le(self.x);
11038 __tmp.put_i32_le(self.y);
11039 __tmp.put_f32_le(self.z);
11040 __tmp.put_u16_le(self.command as u16);
11041 __tmp.put_u8(self.target_system);
11042 __tmp.put_u8(self.target_component);
11043 __tmp.put_u8(self.frame as u8);
11044 __tmp.put_u8(self.current);
11045 __tmp.put_u8(self.autocontinue);
11046 if matches!(version, MavlinkVersion::V2) {
11047 let len = __tmp.len();
11048 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11049 } else {
11050 __tmp.len()
11051 }
11052 }
11053}
11054#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11055#[doc = ""]
11056#[doc = "ID: 76"]
11057#[derive(Debug, Clone, PartialEq)]
11058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11060#[cfg_attr(feature = "ts", derive(TS))]
11061#[cfg_attr(feature = "ts", ts(export))]
11062pub struct COMMAND_LONG_DATA {
11063 #[doc = "Parameter 1 (for the specific command)."]
11064 pub param1: f32,
11065 #[doc = "Parameter 2 (for the specific command)."]
11066 pub param2: f32,
11067 #[doc = "Parameter 3 (for the specific command)."]
11068 pub param3: f32,
11069 #[doc = "Parameter 4 (for the specific command)."]
11070 pub param4: f32,
11071 #[doc = "Parameter 5 (for the specific command)."]
11072 pub param5: f32,
11073 #[doc = "Parameter 6 (for the specific command)."]
11074 pub param6: f32,
11075 #[doc = "Parameter 7 (for the specific command)."]
11076 pub param7: f32,
11077 #[doc = "Command ID (of command to send)."]
11078 pub command: MavCmd,
11079 #[doc = "System which should execute the command"]
11080 pub target_system: u8,
11081 #[doc = "Component which should execute the command, 0 for all components"]
11082 pub target_component: u8,
11083 #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
11084 pub confirmation: u8,
11085}
11086impl COMMAND_LONG_DATA {
11087 pub const ENCODED_LEN: usize = 33usize;
11088 pub const DEFAULT: Self = Self {
11089 param1: 0.0_f32,
11090 param2: 0.0_f32,
11091 param3: 0.0_f32,
11092 param4: 0.0_f32,
11093 param5: 0.0_f32,
11094 param6: 0.0_f32,
11095 param7: 0.0_f32,
11096 command: MavCmd::DEFAULT,
11097 target_system: 0_u8,
11098 target_component: 0_u8,
11099 confirmation: 0_u8,
11100 };
11101 #[cfg(feature = "arbitrary")]
11102 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11103 use arbitrary::{Arbitrary, Unstructured};
11104 let mut buf = [0u8; 1024];
11105 rng.fill_bytes(&mut buf);
11106 let mut unstructured = Unstructured::new(&buf);
11107 Self::arbitrary(&mut unstructured).unwrap_or_default()
11108 }
11109}
11110impl Default for COMMAND_LONG_DATA {
11111 fn default() -> Self {
11112 Self::DEFAULT.clone()
11113 }
11114}
11115impl MessageData for COMMAND_LONG_DATA {
11116 type Message = MavMessage;
11117 const ID: u32 = 76u32;
11118 const NAME: &'static str = "COMMAND_LONG";
11119 const EXTRA_CRC: u8 = 152u8;
11120 const ENCODED_LEN: usize = 33usize;
11121 fn deser(
11122 _version: MavlinkVersion,
11123 __input: &[u8],
11124 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11125 let avail_len = __input.len();
11126 let mut payload_buf = [0; Self::ENCODED_LEN];
11127 let mut buf = if avail_len < Self::ENCODED_LEN {
11128 payload_buf[0..avail_len].copy_from_slice(__input);
11129 Bytes::new(&payload_buf)
11130 } else {
11131 Bytes::new(__input)
11132 };
11133 let mut __struct = Self::default();
11134 __struct.param1 = buf.get_f32_le()?;
11135 __struct.param2 = buf.get_f32_le()?;
11136 __struct.param3 = buf.get_f32_le()?;
11137 __struct.param4 = buf.get_f32_le()?;
11138 __struct.param5 = buf.get_f32_le()?;
11139 __struct.param6 = buf.get_f32_le()?;
11140 __struct.param7 = buf.get_f32_le()?;
11141 let tmp = buf.get_u16_le()?;
11142 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11143 ::mavlink_core::error::ParserError::InvalidEnum {
11144 enum_type: "MavCmd",
11145 value: tmp as u64,
11146 },
11147 )?;
11148 __struct.target_system = buf.get_u8()?;
11149 __struct.target_component = buf.get_u8()?;
11150 __struct.confirmation = buf.get_u8()?;
11151 Ok(__struct)
11152 }
11153 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11154 let mut __tmp = BytesMut::new(bytes);
11155 #[allow(clippy::absurd_extreme_comparisons)]
11156 #[allow(unused_comparisons)]
11157 if __tmp.remaining() < Self::ENCODED_LEN {
11158 panic!(
11159 "buffer is too small (need {} bytes, but got {})",
11160 Self::ENCODED_LEN,
11161 __tmp.remaining(),
11162 )
11163 }
11164 __tmp.put_f32_le(self.param1);
11165 __tmp.put_f32_le(self.param2);
11166 __tmp.put_f32_le(self.param3);
11167 __tmp.put_f32_le(self.param4);
11168 __tmp.put_f32_le(self.param5);
11169 __tmp.put_f32_le(self.param6);
11170 __tmp.put_f32_le(self.param7);
11171 __tmp.put_u16_le(self.command as u16);
11172 __tmp.put_u8(self.target_system);
11173 __tmp.put_u8(self.target_component);
11174 __tmp.put_u8(self.confirmation);
11175 if matches!(version, MavlinkVersion::V2) {
11176 let len = __tmp.len();
11177 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11178 } else {
11179 __tmp.len()
11180 }
11181 }
11182}
11183#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
11184#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
11185#[doc = ""]
11186#[doc = "ID: 395"]
11187#[derive(Debug, Clone, PartialEq)]
11188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11190#[cfg_attr(feature = "ts", derive(TS))]
11191#[cfg_attr(feature = "ts", ts(export))]
11192pub struct COMPONENT_INFORMATION_DATA {
11193 #[doc = "Timestamp (time since system boot)."]
11194 pub time_boot_ms: u32,
11195 #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
11196 pub general_metadata_file_crc: u32,
11197 #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
11198 pub peripherals_metadata_file_crc: u32,
11199 #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
11200 #[cfg_attr(feature = "ts", ts(type = "string"))]
11201 pub general_metadata_uri: CharArray<100>,
11202 #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
11203 #[cfg_attr(feature = "ts", ts(type = "string"))]
11204 pub peripherals_metadata_uri: CharArray<100>,
11205}
11206impl COMPONENT_INFORMATION_DATA {
11207 pub const ENCODED_LEN: usize = 212usize;
11208 pub const DEFAULT: Self = Self {
11209 time_boot_ms: 0_u32,
11210 general_metadata_file_crc: 0_u32,
11211 peripherals_metadata_file_crc: 0_u32,
11212 general_metadata_uri: CharArray::new([0_u8; 100usize]),
11213 peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
11214 };
11215 #[cfg(feature = "arbitrary")]
11216 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11217 use arbitrary::{Arbitrary, Unstructured};
11218 let mut buf = [0u8; 1024];
11219 rng.fill_bytes(&mut buf);
11220 let mut unstructured = Unstructured::new(&buf);
11221 Self::arbitrary(&mut unstructured).unwrap_or_default()
11222 }
11223}
11224impl Default for COMPONENT_INFORMATION_DATA {
11225 fn default() -> Self {
11226 Self::DEFAULT.clone()
11227 }
11228}
11229impl MessageData for COMPONENT_INFORMATION_DATA {
11230 type Message = MavMessage;
11231 const ID: u32 = 395u32;
11232 const NAME: &'static str = "COMPONENT_INFORMATION";
11233 const EXTRA_CRC: u8 = 0u8;
11234 const ENCODED_LEN: usize = 212usize;
11235 fn deser(
11236 _version: MavlinkVersion,
11237 __input: &[u8],
11238 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11239 let avail_len = __input.len();
11240 let mut payload_buf = [0; Self::ENCODED_LEN];
11241 let mut buf = if avail_len < Self::ENCODED_LEN {
11242 payload_buf[0..avail_len].copy_from_slice(__input);
11243 Bytes::new(&payload_buf)
11244 } else {
11245 Bytes::new(__input)
11246 };
11247 let mut __struct = Self::default();
11248 __struct.time_boot_ms = buf.get_u32_le()?;
11249 __struct.general_metadata_file_crc = buf.get_u32_le()?;
11250 __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
11251 let mut tmp = [0_u8; 100usize];
11252 for v in &mut tmp {
11253 *v = buf.get_u8()?;
11254 }
11255 __struct.general_metadata_uri = CharArray::new(tmp);
11256 let mut tmp = [0_u8; 100usize];
11257 for v in &mut tmp {
11258 *v = buf.get_u8()?;
11259 }
11260 __struct.peripherals_metadata_uri = CharArray::new(tmp);
11261 Ok(__struct)
11262 }
11263 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11264 let mut __tmp = BytesMut::new(bytes);
11265 #[allow(clippy::absurd_extreme_comparisons)]
11266 #[allow(unused_comparisons)]
11267 if __tmp.remaining() < Self::ENCODED_LEN {
11268 panic!(
11269 "buffer is too small (need {} bytes, but got {})",
11270 Self::ENCODED_LEN,
11271 __tmp.remaining(),
11272 )
11273 }
11274 __tmp.put_u32_le(self.time_boot_ms);
11275 __tmp.put_u32_le(self.general_metadata_file_crc);
11276 __tmp.put_u32_le(self.peripherals_metadata_file_crc);
11277 for val in &self.general_metadata_uri {
11278 __tmp.put_u8(*val);
11279 }
11280 for val in &self.peripherals_metadata_uri {
11281 __tmp.put_u8(*val);
11282 }
11283 if matches!(version, MavlinkVersion::V2) {
11284 let len = __tmp.len();
11285 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11286 } else {
11287 __tmp.len()
11288 }
11289 }
11290}
11291#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
11292#[doc = ""]
11293#[doc = "ID: 396"]
11294#[derive(Debug, Clone, PartialEq)]
11295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11297#[cfg_attr(feature = "ts", derive(TS))]
11298#[cfg_attr(feature = "ts", ts(export))]
11299pub struct COMPONENT_INFORMATION_BASIC_DATA {
11300 #[doc = "Component capability flags"]
11301 pub capabilities: MavProtocolCapability,
11302 #[doc = "Timestamp (time since system boot)."]
11303 pub time_boot_ms: u32,
11304 #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
11305 pub time_manufacture_s: u32,
11306 #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
11307 #[cfg_attr(feature = "ts", ts(type = "string"))]
11308 pub vendor_name: CharArray<32>,
11309 #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
11310 #[cfg_attr(feature = "ts", ts(type = "string"))]
11311 pub model_name: CharArray<32>,
11312 #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
11313 #[cfg_attr(feature = "ts", ts(type = "string"))]
11314 pub software_version: CharArray<24>,
11315 #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
11316 #[cfg_attr(feature = "ts", ts(type = "string"))]
11317 pub hardware_version: CharArray<24>,
11318 #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
11319 #[cfg_attr(feature = "ts", ts(type = "string"))]
11320 pub serial_number: CharArray<32>,
11321}
11322impl COMPONENT_INFORMATION_BASIC_DATA {
11323 pub const ENCODED_LEN: usize = 160usize;
11324 pub const DEFAULT: Self = Self {
11325 capabilities: MavProtocolCapability::DEFAULT,
11326 time_boot_ms: 0_u32,
11327 time_manufacture_s: 0_u32,
11328 vendor_name: CharArray::new([0_u8; 32usize]),
11329 model_name: CharArray::new([0_u8; 32usize]),
11330 software_version: CharArray::new([0_u8; 24usize]),
11331 hardware_version: CharArray::new([0_u8; 24usize]),
11332 serial_number: CharArray::new([0_u8; 32usize]),
11333 };
11334 #[cfg(feature = "arbitrary")]
11335 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11336 use arbitrary::{Arbitrary, Unstructured};
11337 let mut buf = [0u8; 1024];
11338 rng.fill_bytes(&mut buf);
11339 let mut unstructured = Unstructured::new(&buf);
11340 Self::arbitrary(&mut unstructured).unwrap_or_default()
11341 }
11342}
11343impl Default for COMPONENT_INFORMATION_BASIC_DATA {
11344 fn default() -> Self {
11345 Self::DEFAULT.clone()
11346 }
11347}
11348impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
11349 type Message = MavMessage;
11350 const ID: u32 = 396u32;
11351 const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
11352 const EXTRA_CRC: u8 = 50u8;
11353 const ENCODED_LEN: usize = 160usize;
11354 fn deser(
11355 _version: MavlinkVersion,
11356 __input: &[u8],
11357 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11358 let avail_len = __input.len();
11359 let mut payload_buf = [0; Self::ENCODED_LEN];
11360 let mut buf = if avail_len < Self::ENCODED_LEN {
11361 payload_buf[0..avail_len].copy_from_slice(__input);
11362 Bytes::new(&payload_buf)
11363 } else {
11364 Bytes::new(__input)
11365 };
11366 let mut __struct = Self::default();
11367 let tmp = buf.get_u64_le()?;
11368 __struct.capabilities = MavProtocolCapability::from_bits(
11369 tmp as <MavProtocolCapability as Flags>::Bits,
11370 )
11371 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11372 flag_type: "MavProtocolCapability",
11373 value: tmp as u64,
11374 })?;
11375 __struct.time_boot_ms = buf.get_u32_le()?;
11376 __struct.time_manufacture_s = buf.get_u32_le()?;
11377 let mut tmp = [0_u8; 32usize];
11378 for v in &mut tmp {
11379 *v = buf.get_u8()?;
11380 }
11381 __struct.vendor_name = CharArray::new(tmp);
11382 let mut tmp = [0_u8; 32usize];
11383 for v in &mut tmp {
11384 *v = buf.get_u8()?;
11385 }
11386 __struct.model_name = CharArray::new(tmp);
11387 let mut tmp = [0_u8; 24usize];
11388 for v in &mut tmp {
11389 *v = buf.get_u8()?;
11390 }
11391 __struct.software_version = CharArray::new(tmp);
11392 let mut tmp = [0_u8; 24usize];
11393 for v in &mut tmp {
11394 *v = buf.get_u8()?;
11395 }
11396 __struct.hardware_version = CharArray::new(tmp);
11397 let mut tmp = [0_u8; 32usize];
11398 for v in &mut tmp {
11399 *v = buf.get_u8()?;
11400 }
11401 __struct.serial_number = CharArray::new(tmp);
11402 Ok(__struct)
11403 }
11404 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11405 let mut __tmp = BytesMut::new(bytes);
11406 #[allow(clippy::absurd_extreme_comparisons)]
11407 #[allow(unused_comparisons)]
11408 if __tmp.remaining() < Self::ENCODED_LEN {
11409 panic!(
11410 "buffer is too small (need {} bytes, but got {})",
11411 Self::ENCODED_LEN,
11412 __tmp.remaining(),
11413 )
11414 }
11415 __tmp.put_u64_le(self.capabilities.bits() as u64);
11416 __tmp.put_u32_le(self.time_boot_ms);
11417 __tmp.put_u32_le(self.time_manufacture_s);
11418 for val in &self.vendor_name {
11419 __tmp.put_u8(*val);
11420 }
11421 for val in &self.model_name {
11422 __tmp.put_u8(*val);
11423 }
11424 for val in &self.software_version {
11425 __tmp.put_u8(*val);
11426 }
11427 for val in &self.hardware_version {
11428 __tmp.put_u8(*val);
11429 }
11430 for val in &self.serial_number {
11431 __tmp.put_u8(*val);
11432 }
11433 if matches!(version, MavlinkVersion::V2) {
11434 let len = __tmp.len();
11435 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11436 } else {
11437 __tmp.len()
11438 }
11439 }
11440}
11441#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE. This contains the MAVLink FTP URI and CRC for the component's general metadata file. The file must be hosted on the component, and may be xz compressed. The file CRC can be used for file caching. The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet. For more information see: <https://mavlink.io/en/services/component_information.html>. Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
11442#[doc = ""]
11443#[doc = "ID: 397"]
11444#[derive(Debug, Clone, PartialEq)]
11445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11447#[cfg_attr(feature = "ts", derive(TS))]
11448#[cfg_attr(feature = "ts", ts(export))]
11449pub struct COMPONENT_METADATA_DATA {
11450 #[doc = "Timestamp (time since system boot)."]
11451 pub time_boot_ms: u32,
11452 #[doc = "CRC32 of the general metadata file."]
11453 pub file_crc: u32,
11454 #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
11455 #[cfg_attr(feature = "ts", ts(type = "string"))]
11456 pub uri: CharArray<100>,
11457}
11458impl COMPONENT_METADATA_DATA {
11459 pub const ENCODED_LEN: usize = 108usize;
11460 pub const DEFAULT: Self = Self {
11461 time_boot_ms: 0_u32,
11462 file_crc: 0_u32,
11463 uri: CharArray::new([0_u8; 100usize]),
11464 };
11465 #[cfg(feature = "arbitrary")]
11466 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11467 use arbitrary::{Arbitrary, Unstructured};
11468 let mut buf = [0u8; 1024];
11469 rng.fill_bytes(&mut buf);
11470 let mut unstructured = Unstructured::new(&buf);
11471 Self::arbitrary(&mut unstructured).unwrap_or_default()
11472 }
11473}
11474impl Default for COMPONENT_METADATA_DATA {
11475 fn default() -> Self {
11476 Self::DEFAULT.clone()
11477 }
11478}
11479impl MessageData for COMPONENT_METADATA_DATA {
11480 type Message = MavMessage;
11481 const ID: u32 = 397u32;
11482 const NAME: &'static str = "COMPONENT_METADATA";
11483 const EXTRA_CRC: u8 = 182u8;
11484 const ENCODED_LEN: usize = 108usize;
11485 fn deser(
11486 _version: MavlinkVersion,
11487 __input: &[u8],
11488 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11489 let avail_len = __input.len();
11490 let mut payload_buf = [0; Self::ENCODED_LEN];
11491 let mut buf = if avail_len < Self::ENCODED_LEN {
11492 payload_buf[0..avail_len].copy_from_slice(__input);
11493 Bytes::new(&payload_buf)
11494 } else {
11495 Bytes::new(__input)
11496 };
11497 let mut __struct = Self::default();
11498 __struct.time_boot_ms = buf.get_u32_le()?;
11499 __struct.file_crc = buf.get_u32_le()?;
11500 let mut tmp = [0_u8; 100usize];
11501 for v in &mut tmp {
11502 *v = buf.get_u8()?;
11503 }
11504 __struct.uri = CharArray::new(tmp);
11505 Ok(__struct)
11506 }
11507 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11508 let mut __tmp = BytesMut::new(bytes);
11509 #[allow(clippy::absurd_extreme_comparisons)]
11510 #[allow(unused_comparisons)]
11511 if __tmp.remaining() < Self::ENCODED_LEN {
11512 panic!(
11513 "buffer is too small (need {} bytes, but got {})",
11514 Self::ENCODED_LEN,
11515 __tmp.remaining(),
11516 )
11517 }
11518 __tmp.put_u32_le(self.time_boot_ms);
11519 __tmp.put_u32_le(self.file_crc);
11520 for val in &self.uri {
11521 __tmp.put_u8(*val);
11522 }
11523 if matches!(version, MavlinkVersion::V2) {
11524 let len = __tmp.len();
11525 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11526 } else {
11527 __tmp.len()
11528 }
11529 }
11530}
11531#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
11532#[doc = ""]
11533#[doc = "ID: 146"]
11534#[derive(Debug, Clone, PartialEq)]
11535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11537#[cfg_attr(feature = "ts", derive(TS))]
11538#[cfg_attr(feature = "ts", ts(export))]
11539pub struct CONTROL_SYSTEM_STATE_DATA {
11540 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11541 pub time_usec: u64,
11542 #[doc = "X acceleration in body frame"]
11543 pub x_acc: f32,
11544 #[doc = "Y acceleration in body frame"]
11545 pub y_acc: f32,
11546 #[doc = "Z acceleration in body frame"]
11547 pub z_acc: f32,
11548 #[doc = "X velocity in body frame"]
11549 pub x_vel: f32,
11550 #[doc = "Y velocity in body frame"]
11551 pub y_vel: f32,
11552 #[doc = "Z velocity in body frame"]
11553 pub z_vel: f32,
11554 #[doc = "X position in local frame"]
11555 pub x_pos: f32,
11556 #[doc = "Y position in local frame"]
11557 pub y_pos: f32,
11558 #[doc = "Z position in local frame"]
11559 pub z_pos: f32,
11560 #[doc = "Airspeed, set to -1 if unknown"]
11561 pub airspeed: f32,
11562 #[doc = "Variance of body velocity estimate"]
11563 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11564 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11565 pub vel_variance: [f32; 3],
11566 #[doc = "Variance in local position"]
11567 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11568 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11569 pub pos_variance: [f32; 3],
11570 #[doc = "The attitude, represented as Quaternion"]
11571 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11572 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11573 pub q: [f32; 4],
11574 #[doc = "Angular rate in roll axis"]
11575 pub roll_rate: f32,
11576 #[doc = "Angular rate in pitch axis"]
11577 pub pitch_rate: f32,
11578 #[doc = "Angular rate in yaw axis"]
11579 pub yaw_rate: f32,
11580}
11581impl CONTROL_SYSTEM_STATE_DATA {
11582 pub const ENCODED_LEN: usize = 100usize;
11583 pub const DEFAULT: Self = Self {
11584 time_usec: 0_u64,
11585 x_acc: 0.0_f32,
11586 y_acc: 0.0_f32,
11587 z_acc: 0.0_f32,
11588 x_vel: 0.0_f32,
11589 y_vel: 0.0_f32,
11590 z_vel: 0.0_f32,
11591 x_pos: 0.0_f32,
11592 y_pos: 0.0_f32,
11593 z_pos: 0.0_f32,
11594 airspeed: 0.0_f32,
11595 vel_variance: [0.0_f32; 3usize],
11596 pos_variance: [0.0_f32; 3usize],
11597 q: [0.0_f32; 4usize],
11598 roll_rate: 0.0_f32,
11599 pitch_rate: 0.0_f32,
11600 yaw_rate: 0.0_f32,
11601 };
11602 #[cfg(feature = "arbitrary")]
11603 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11604 use arbitrary::{Arbitrary, Unstructured};
11605 let mut buf = [0u8; 1024];
11606 rng.fill_bytes(&mut buf);
11607 let mut unstructured = Unstructured::new(&buf);
11608 Self::arbitrary(&mut unstructured).unwrap_or_default()
11609 }
11610}
11611impl Default for CONTROL_SYSTEM_STATE_DATA {
11612 fn default() -> Self {
11613 Self::DEFAULT.clone()
11614 }
11615}
11616impl MessageData for CONTROL_SYSTEM_STATE_DATA {
11617 type Message = MavMessage;
11618 const ID: u32 = 146u32;
11619 const NAME: &'static str = "CONTROL_SYSTEM_STATE";
11620 const EXTRA_CRC: u8 = 103u8;
11621 const ENCODED_LEN: usize = 100usize;
11622 fn deser(
11623 _version: MavlinkVersion,
11624 __input: &[u8],
11625 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11626 let avail_len = __input.len();
11627 let mut payload_buf = [0; Self::ENCODED_LEN];
11628 let mut buf = if avail_len < Self::ENCODED_LEN {
11629 payload_buf[0..avail_len].copy_from_slice(__input);
11630 Bytes::new(&payload_buf)
11631 } else {
11632 Bytes::new(__input)
11633 };
11634 let mut __struct = Self::default();
11635 __struct.time_usec = buf.get_u64_le()?;
11636 __struct.x_acc = buf.get_f32_le()?;
11637 __struct.y_acc = buf.get_f32_le()?;
11638 __struct.z_acc = buf.get_f32_le()?;
11639 __struct.x_vel = buf.get_f32_le()?;
11640 __struct.y_vel = buf.get_f32_le()?;
11641 __struct.z_vel = buf.get_f32_le()?;
11642 __struct.x_pos = buf.get_f32_le()?;
11643 __struct.y_pos = buf.get_f32_le()?;
11644 __struct.z_pos = buf.get_f32_le()?;
11645 __struct.airspeed = buf.get_f32_le()?;
11646 for v in &mut __struct.vel_variance {
11647 let val = buf.get_f32_le()?;
11648 *v = val;
11649 }
11650 for v in &mut __struct.pos_variance {
11651 let val = buf.get_f32_le()?;
11652 *v = val;
11653 }
11654 for v in &mut __struct.q {
11655 let val = buf.get_f32_le()?;
11656 *v = val;
11657 }
11658 __struct.roll_rate = buf.get_f32_le()?;
11659 __struct.pitch_rate = buf.get_f32_le()?;
11660 __struct.yaw_rate = buf.get_f32_le()?;
11661 Ok(__struct)
11662 }
11663 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11664 let mut __tmp = BytesMut::new(bytes);
11665 #[allow(clippy::absurd_extreme_comparisons)]
11666 #[allow(unused_comparisons)]
11667 if __tmp.remaining() < Self::ENCODED_LEN {
11668 panic!(
11669 "buffer is too small (need {} bytes, but got {})",
11670 Self::ENCODED_LEN,
11671 __tmp.remaining(),
11672 )
11673 }
11674 __tmp.put_u64_le(self.time_usec);
11675 __tmp.put_f32_le(self.x_acc);
11676 __tmp.put_f32_le(self.y_acc);
11677 __tmp.put_f32_le(self.z_acc);
11678 __tmp.put_f32_le(self.x_vel);
11679 __tmp.put_f32_le(self.y_vel);
11680 __tmp.put_f32_le(self.z_vel);
11681 __tmp.put_f32_le(self.x_pos);
11682 __tmp.put_f32_le(self.y_pos);
11683 __tmp.put_f32_le(self.z_pos);
11684 __tmp.put_f32_le(self.airspeed);
11685 for val in &self.vel_variance {
11686 __tmp.put_f32_le(*val);
11687 }
11688 for val in &self.pos_variance {
11689 __tmp.put_f32_le(*val);
11690 }
11691 for val in &self.q {
11692 __tmp.put_f32_le(*val);
11693 }
11694 __tmp.put_f32_le(self.roll_rate);
11695 __tmp.put_f32_le(self.pitch_rate);
11696 __tmp.put_f32_le(self.yaw_rate);
11697 if matches!(version, MavlinkVersion::V2) {
11698 let len = __tmp.len();
11699 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11700 } else {
11701 __tmp.len()
11702 }
11703 }
11704}
11705#[doc = "offset response to encapsulated data."]
11706#[doc = ""]
11707#[doc = "ID: 50005"]
11708#[derive(Debug, Clone, PartialEq)]
11709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11711#[cfg_attr(feature = "ts", derive(TS))]
11712#[cfg_attr(feature = "ts", ts(export))]
11713pub struct CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
11714 #[doc = "FW Offset."]
11715 pub offset: u32,
11716 #[doc = "System ID."]
11717 pub target_system: u8,
11718 #[doc = "Component ID."]
11719 pub target_component: u8,
11720}
11721impl CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
11722 pub const ENCODED_LEN: usize = 6usize;
11723 pub const DEFAULT: Self = Self {
11724 offset: 0_u32,
11725 target_system: 0_u8,
11726 target_component: 0_u8,
11727 };
11728 #[cfg(feature = "arbitrary")]
11729 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11730 use arbitrary::{Arbitrary, Unstructured};
11731 let mut buf = [0u8; 1024];
11732 rng.fill_bytes(&mut buf);
11733 let mut unstructured = Unstructured::new(&buf);
11734 Self::arbitrary(&mut unstructured).unwrap_or_default()
11735 }
11736}
11737impl Default for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
11738 fn default() -> Self {
11739 Self::DEFAULT.clone()
11740 }
11741}
11742impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
11743 type Message = MavMessage;
11744 const ID: u32 = 50005u32;
11745 const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_RESP";
11746 const EXTRA_CRC: u8 = 152u8;
11747 const ENCODED_LEN: usize = 6usize;
11748 fn deser(
11749 _version: MavlinkVersion,
11750 __input: &[u8],
11751 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11752 let avail_len = __input.len();
11753 let mut payload_buf = [0; Self::ENCODED_LEN];
11754 let mut buf = if avail_len < Self::ENCODED_LEN {
11755 payload_buf[0..avail_len].copy_from_slice(__input);
11756 Bytes::new(&payload_buf)
11757 } else {
11758 Bytes::new(__input)
11759 };
11760 let mut __struct = Self::default();
11761 __struct.offset = buf.get_u32_le()?;
11762 __struct.target_system = buf.get_u8()?;
11763 __struct.target_component = buf.get_u8()?;
11764 Ok(__struct)
11765 }
11766 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11767 let mut __tmp = BytesMut::new(bytes);
11768 #[allow(clippy::absurd_extreme_comparisons)]
11769 #[allow(unused_comparisons)]
11770 if __tmp.remaining() < Self::ENCODED_LEN {
11771 panic!(
11772 "buffer is too small (need {} bytes, but got {})",
11773 Self::ENCODED_LEN,
11774 __tmp.remaining(),
11775 )
11776 }
11777 __tmp.put_u32_le(self.offset);
11778 __tmp.put_u8(self.target_system);
11779 __tmp.put_u8(self.target_component);
11780 if matches!(version, MavlinkVersion::V2) {
11781 let len = __tmp.len();
11782 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11783 } else {
11784 __tmp.len()
11785 }
11786 }
11787}
11788#[doc = "Start firmware update with encapsulated data."]
11789#[doc = ""]
11790#[doc = "ID: 50004"]
11791#[derive(Debug, Clone, PartialEq)]
11792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11794#[cfg_attr(feature = "ts", derive(TS))]
11795#[cfg_attr(feature = "ts", ts(export))]
11796pub struct CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
11797 #[doc = "FW Size."]
11798 pub size: u32,
11799 #[doc = "FW CRC."]
11800 pub crc: u32,
11801 #[doc = "System ID."]
11802 pub target_system: u8,
11803 #[doc = "Component ID."]
11804 pub target_component: u8,
11805}
11806impl CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
11807 pub const ENCODED_LEN: usize = 10usize;
11808 pub const DEFAULT: Self = Self {
11809 size: 0_u32,
11810 crc: 0_u32,
11811 target_system: 0_u8,
11812 target_component: 0_u8,
11813 };
11814 #[cfg(feature = "arbitrary")]
11815 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11816 use arbitrary::{Arbitrary, Unstructured};
11817 let mut buf = [0u8; 1024];
11818 rng.fill_bytes(&mut buf);
11819 let mut unstructured = Unstructured::new(&buf);
11820 Self::arbitrary(&mut unstructured).unwrap_or_default()
11821 }
11822}
11823impl Default for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
11824 fn default() -> Self {
11825 Self::DEFAULT.clone()
11826 }
11827}
11828impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
11829 type Message = MavMessage;
11830 const ID: u32 = 50004u32;
11831 const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_START";
11832 const EXTRA_CRC: u8 = 240u8;
11833 const ENCODED_LEN: usize = 10usize;
11834 fn deser(
11835 _version: MavlinkVersion,
11836 __input: &[u8],
11837 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11838 let avail_len = __input.len();
11839 let mut payload_buf = [0; Self::ENCODED_LEN];
11840 let mut buf = if avail_len < Self::ENCODED_LEN {
11841 payload_buf[0..avail_len].copy_from_slice(__input);
11842 Bytes::new(&payload_buf)
11843 } else {
11844 Bytes::new(__input)
11845 };
11846 let mut __struct = Self::default();
11847 __struct.size = buf.get_u32_le()?;
11848 __struct.crc = buf.get_u32_le()?;
11849 __struct.target_system = buf.get_u8()?;
11850 __struct.target_component = buf.get_u8()?;
11851 Ok(__struct)
11852 }
11853 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11854 let mut __tmp = BytesMut::new(bytes);
11855 #[allow(clippy::absurd_extreme_comparisons)]
11856 #[allow(unused_comparisons)]
11857 if __tmp.remaining() < Self::ENCODED_LEN {
11858 panic!(
11859 "buffer is too small (need {} bytes, but got {})",
11860 Self::ENCODED_LEN,
11861 __tmp.remaining(),
11862 )
11863 }
11864 __tmp.put_u32_le(self.size);
11865 __tmp.put_u32_le(self.crc);
11866 __tmp.put_u8(self.target_system);
11867 __tmp.put_u8(self.target_component);
11868 if matches!(version, MavlinkVersion::V2) {
11869 let len = __tmp.len();
11870 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11871 } else {
11872 __tmp.len()
11873 }
11874 }
11875}
11876#[doc = "Raw RC Data."]
11877#[doc = ""]
11878#[doc = "ID: 50001"]
11879#[derive(Debug, Clone, PartialEq)]
11880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11882#[cfg_attr(feature = "ts", derive(TS))]
11883#[cfg_attr(feature = "ts", ts(export))]
11884pub struct CUBEPILOT_RAW_RC_DATA {
11885 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11886 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11887 pub rc_raw: [u8; 32],
11888}
11889impl CUBEPILOT_RAW_RC_DATA {
11890 pub const ENCODED_LEN: usize = 32usize;
11891 pub const DEFAULT: Self = Self {
11892 rc_raw: [0_u8; 32usize],
11893 };
11894 #[cfg(feature = "arbitrary")]
11895 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11896 use arbitrary::{Arbitrary, Unstructured};
11897 let mut buf = [0u8; 1024];
11898 rng.fill_bytes(&mut buf);
11899 let mut unstructured = Unstructured::new(&buf);
11900 Self::arbitrary(&mut unstructured).unwrap_or_default()
11901 }
11902}
11903impl Default for CUBEPILOT_RAW_RC_DATA {
11904 fn default() -> Self {
11905 Self::DEFAULT.clone()
11906 }
11907}
11908impl MessageData for CUBEPILOT_RAW_RC_DATA {
11909 type Message = MavMessage;
11910 const ID: u32 = 50001u32;
11911 const NAME: &'static str = "CUBEPILOT_RAW_RC";
11912 const EXTRA_CRC: u8 = 246u8;
11913 const ENCODED_LEN: usize = 32usize;
11914 fn deser(
11915 _version: MavlinkVersion,
11916 __input: &[u8],
11917 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11918 let avail_len = __input.len();
11919 let mut payload_buf = [0; Self::ENCODED_LEN];
11920 let mut buf = if avail_len < Self::ENCODED_LEN {
11921 payload_buf[0..avail_len].copy_from_slice(__input);
11922 Bytes::new(&payload_buf)
11923 } else {
11924 Bytes::new(__input)
11925 };
11926 let mut __struct = Self::default();
11927 for v in &mut __struct.rc_raw {
11928 let val = buf.get_u8()?;
11929 *v = val;
11930 }
11931 Ok(__struct)
11932 }
11933 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11934 let mut __tmp = BytesMut::new(bytes);
11935 #[allow(clippy::absurd_extreme_comparisons)]
11936 #[allow(unused_comparisons)]
11937 if __tmp.remaining() < Self::ENCODED_LEN {
11938 panic!(
11939 "buffer is too small (need {} bytes, but got {})",
11940 Self::ENCODED_LEN,
11941 __tmp.remaining(),
11942 )
11943 }
11944 for val in &self.rc_raw {
11945 __tmp.put_u8(*val);
11946 }
11947 if matches!(version, MavlinkVersion::V2) {
11948 let len = __tmp.len();
11949 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11950 } else {
11951 __tmp.len()
11952 }
11953 }
11954}
11955#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
11956#[doc = ""]
11957#[doc = "ID: 411"]
11958#[derive(Debug, Clone, PartialEq)]
11959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11961#[cfg_attr(feature = "ts", derive(TS))]
11962#[cfg_attr(feature = "ts", ts(export))]
11963pub struct CURRENT_EVENT_SEQUENCE_DATA {
11964 #[doc = "Sequence number."]
11965 pub sequence: u16,
11966 #[doc = "Flag bitset."]
11967 pub flags: MavEventCurrentSequenceFlags,
11968}
11969impl CURRENT_EVENT_SEQUENCE_DATA {
11970 pub const ENCODED_LEN: usize = 3usize;
11971 pub const DEFAULT: Self = Self {
11972 sequence: 0_u16,
11973 flags: MavEventCurrentSequenceFlags::DEFAULT,
11974 };
11975 #[cfg(feature = "arbitrary")]
11976 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11977 use arbitrary::{Arbitrary, Unstructured};
11978 let mut buf = [0u8; 1024];
11979 rng.fill_bytes(&mut buf);
11980 let mut unstructured = Unstructured::new(&buf);
11981 Self::arbitrary(&mut unstructured).unwrap_or_default()
11982 }
11983}
11984impl Default for CURRENT_EVENT_SEQUENCE_DATA {
11985 fn default() -> Self {
11986 Self::DEFAULT.clone()
11987 }
11988}
11989impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
11990 type Message = MavMessage;
11991 const ID: u32 = 411u32;
11992 const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
11993 const EXTRA_CRC: u8 = 106u8;
11994 const ENCODED_LEN: usize = 3usize;
11995 fn deser(
11996 _version: MavlinkVersion,
11997 __input: &[u8],
11998 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11999 let avail_len = __input.len();
12000 let mut payload_buf = [0; Self::ENCODED_LEN];
12001 let mut buf = if avail_len < Self::ENCODED_LEN {
12002 payload_buf[0..avail_len].copy_from_slice(__input);
12003 Bytes::new(&payload_buf)
12004 } else {
12005 Bytes::new(__input)
12006 };
12007 let mut __struct = Self::default();
12008 __struct.sequence = buf.get_u16_le()?;
12009 let tmp = buf.get_u8()?;
12010 __struct.flags =
12011 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12012 enum_type: "MavEventCurrentSequenceFlags",
12013 value: tmp as u64,
12014 })?;
12015 Ok(__struct)
12016 }
12017 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12018 let mut __tmp = BytesMut::new(bytes);
12019 #[allow(clippy::absurd_extreme_comparisons)]
12020 #[allow(unused_comparisons)]
12021 if __tmp.remaining() < Self::ENCODED_LEN {
12022 panic!(
12023 "buffer is too small (need {} bytes, but got {})",
12024 Self::ENCODED_LEN,
12025 __tmp.remaining(),
12026 )
12027 }
12028 __tmp.put_u16_le(self.sequence);
12029 __tmp.put_u8(self.flags as u8);
12030 if matches!(version, MavlinkVersion::V2) {
12031 let len = __tmp.len();
12032 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12033 } else {
12034 __tmp.len()
12035 }
12036 }
12037}
12038#[doc = "Get the current mode. This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz). It may be requested using MAV_CMD_REQUEST_MESSAGE. See <https://mavlink.io/en/services/standard_modes.html>."]
12039#[doc = ""]
12040#[doc = "ID: 436"]
12041#[derive(Debug, Clone, PartialEq)]
12042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12044#[cfg_attr(feature = "ts", derive(TS))]
12045#[cfg_attr(feature = "ts", ts(export))]
12046pub struct CURRENT_MODE_DATA {
12047 #[doc = "A bitfield for use for autopilot-specific flags"]
12048 pub custom_mode: u32,
12049 #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
12050 pub intended_custom_mode: u32,
12051 #[doc = "Standard mode."]
12052 pub standard_mode: MavStandardMode,
12053}
12054impl CURRENT_MODE_DATA {
12055 pub const ENCODED_LEN: usize = 9usize;
12056 pub const DEFAULT: Self = Self {
12057 custom_mode: 0_u32,
12058 intended_custom_mode: 0_u32,
12059 standard_mode: MavStandardMode::DEFAULT,
12060 };
12061 #[cfg(feature = "arbitrary")]
12062 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12063 use arbitrary::{Arbitrary, Unstructured};
12064 let mut buf = [0u8; 1024];
12065 rng.fill_bytes(&mut buf);
12066 let mut unstructured = Unstructured::new(&buf);
12067 Self::arbitrary(&mut unstructured).unwrap_or_default()
12068 }
12069}
12070impl Default for CURRENT_MODE_DATA {
12071 fn default() -> Self {
12072 Self::DEFAULT.clone()
12073 }
12074}
12075impl MessageData for CURRENT_MODE_DATA {
12076 type Message = MavMessage;
12077 const ID: u32 = 436u32;
12078 const NAME: &'static str = "CURRENT_MODE";
12079 const EXTRA_CRC: u8 = 193u8;
12080 const ENCODED_LEN: usize = 9usize;
12081 fn deser(
12082 _version: MavlinkVersion,
12083 __input: &[u8],
12084 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12085 let avail_len = __input.len();
12086 let mut payload_buf = [0; Self::ENCODED_LEN];
12087 let mut buf = if avail_len < Self::ENCODED_LEN {
12088 payload_buf[0..avail_len].copy_from_slice(__input);
12089 Bytes::new(&payload_buf)
12090 } else {
12091 Bytes::new(__input)
12092 };
12093 let mut __struct = Self::default();
12094 __struct.custom_mode = buf.get_u32_le()?;
12095 __struct.intended_custom_mode = buf.get_u32_le()?;
12096 let tmp = buf.get_u8()?;
12097 __struct.standard_mode =
12098 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12099 enum_type: "MavStandardMode",
12100 value: tmp as u64,
12101 })?;
12102 Ok(__struct)
12103 }
12104 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12105 let mut __tmp = BytesMut::new(bytes);
12106 #[allow(clippy::absurd_extreme_comparisons)]
12107 #[allow(unused_comparisons)]
12108 if __tmp.remaining() < Self::ENCODED_LEN {
12109 panic!(
12110 "buffer is too small (need {} bytes, but got {})",
12111 Self::ENCODED_LEN,
12112 __tmp.remaining(),
12113 )
12114 }
12115 __tmp.put_u32_le(self.custom_mode);
12116 __tmp.put_u32_le(self.intended_custom_mode);
12117 __tmp.put_u8(self.standard_mode as u8);
12118 if matches!(version, MavlinkVersion::V2) {
12119 let len = __tmp.len();
12120 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12121 } else {
12122 __tmp.len()
12123 }
12124 }
12125}
12126#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
12127#[doc = "Data stream status information."]
12128#[doc = ""]
12129#[doc = "ID: 67"]
12130#[derive(Debug, Clone, PartialEq)]
12131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12133#[cfg_attr(feature = "ts", derive(TS))]
12134#[cfg_attr(feature = "ts", ts(export))]
12135pub struct DATA_STREAM_DATA {
12136 #[doc = "The message rate"]
12137 pub message_rate: u16,
12138 #[doc = "The ID of the requested data stream"]
12139 pub stream_id: u8,
12140 #[doc = "1 stream is enabled, 0 stream is stopped."]
12141 pub on_off: u8,
12142}
12143impl DATA_STREAM_DATA {
12144 pub const ENCODED_LEN: usize = 4usize;
12145 pub const DEFAULT: Self = Self {
12146 message_rate: 0_u16,
12147 stream_id: 0_u8,
12148 on_off: 0_u8,
12149 };
12150 #[cfg(feature = "arbitrary")]
12151 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12152 use arbitrary::{Arbitrary, Unstructured};
12153 let mut buf = [0u8; 1024];
12154 rng.fill_bytes(&mut buf);
12155 let mut unstructured = Unstructured::new(&buf);
12156 Self::arbitrary(&mut unstructured).unwrap_or_default()
12157 }
12158}
12159impl Default for DATA_STREAM_DATA {
12160 fn default() -> Self {
12161 Self::DEFAULT.clone()
12162 }
12163}
12164impl MessageData for DATA_STREAM_DATA {
12165 type Message = MavMessage;
12166 const ID: u32 = 67u32;
12167 const NAME: &'static str = "DATA_STREAM";
12168 const EXTRA_CRC: u8 = 21u8;
12169 const ENCODED_LEN: usize = 4usize;
12170 fn deser(
12171 _version: MavlinkVersion,
12172 __input: &[u8],
12173 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12174 let avail_len = __input.len();
12175 let mut payload_buf = [0; Self::ENCODED_LEN];
12176 let mut buf = if avail_len < Self::ENCODED_LEN {
12177 payload_buf[0..avail_len].copy_from_slice(__input);
12178 Bytes::new(&payload_buf)
12179 } else {
12180 Bytes::new(__input)
12181 };
12182 let mut __struct = Self::default();
12183 __struct.message_rate = buf.get_u16_le()?;
12184 __struct.stream_id = buf.get_u8()?;
12185 __struct.on_off = buf.get_u8()?;
12186 Ok(__struct)
12187 }
12188 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12189 let mut __tmp = BytesMut::new(bytes);
12190 #[allow(clippy::absurd_extreme_comparisons)]
12191 #[allow(unused_comparisons)]
12192 if __tmp.remaining() < Self::ENCODED_LEN {
12193 panic!(
12194 "buffer is too small (need {} bytes, but got {})",
12195 Self::ENCODED_LEN,
12196 __tmp.remaining(),
12197 )
12198 }
12199 __tmp.put_u16_le(self.message_rate);
12200 __tmp.put_u8(self.stream_id);
12201 __tmp.put_u8(self.on_off);
12202 if matches!(version, MavlinkVersion::V2) {
12203 let len = __tmp.len();
12204 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12205 } else {
12206 __tmp.len()
12207 }
12208 }
12209}
12210#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
12211#[doc = ""]
12212#[doc = "ID: 130"]
12213#[derive(Debug, Clone, PartialEq)]
12214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12216#[cfg_attr(feature = "ts", derive(TS))]
12217#[cfg_attr(feature = "ts", ts(export))]
12218pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
12219 #[doc = "total data size (set on ACK only)."]
12220 pub size: u32,
12221 #[doc = "Width of a matrix or image."]
12222 pub width: u16,
12223 #[doc = "Height of a matrix or image."]
12224 pub height: u16,
12225 #[doc = "Number of packets being sent (set on ACK only)."]
12226 pub packets: u16,
12227 #[doc = "Type of requested/acknowledged data."]
12228 pub mavtype: MavlinkDataStreamType,
12229 #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
12230 pub payload: u8,
12231 #[doc = "JPEG quality. Values: [1-100]."]
12232 pub jpg_quality: u8,
12233}
12234impl DATA_TRANSMISSION_HANDSHAKE_DATA {
12235 pub const ENCODED_LEN: usize = 13usize;
12236 pub const DEFAULT: Self = Self {
12237 size: 0_u32,
12238 width: 0_u16,
12239 height: 0_u16,
12240 packets: 0_u16,
12241 mavtype: MavlinkDataStreamType::DEFAULT,
12242 payload: 0_u8,
12243 jpg_quality: 0_u8,
12244 };
12245 #[cfg(feature = "arbitrary")]
12246 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12247 use arbitrary::{Arbitrary, Unstructured};
12248 let mut buf = [0u8; 1024];
12249 rng.fill_bytes(&mut buf);
12250 let mut unstructured = Unstructured::new(&buf);
12251 Self::arbitrary(&mut unstructured).unwrap_or_default()
12252 }
12253}
12254impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
12255 fn default() -> Self {
12256 Self::DEFAULT.clone()
12257 }
12258}
12259impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
12260 type Message = MavMessage;
12261 const ID: u32 = 130u32;
12262 const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
12263 const EXTRA_CRC: u8 = 29u8;
12264 const ENCODED_LEN: usize = 13usize;
12265 fn deser(
12266 _version: MavlinkVersion,
12267 __input: &[u8],
12268 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12269 let avail_len = __input.len();
12270 let mut payload_buf = [0; Self::ENCODED_LEN];
12271 let mut buf = if avail_len < Self::ENCODED_LEN {
12272 payload_buf[0..avail_len].copy_from_slice(__input);
12273 Bytes::new(&payload_buf)
12274 } else {
12275 Bytes::new(__input)
12276 };
12277 let mut __struct = Self::default();
12278 __struct.size = buf.get_u32_le()?;
12279 __struct.width = buf.get_u16_le()?;
12280 __struct.height = buf.get_u16_le()?;
12281 __struct.packets = buf.get_u16_le()?;
12282 let tmp = buf.get_u8()?;
12283 __struct.mavtype =
12284 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12285 enum_type: "MavlinkDataStreamType",
12286 value: tmp as u64,
12287 })?;
12288 __struct.payload = buf.get_u8()?;
12289 __struct.jpg_quality = buf.get_u8()?;
12290 Ok(__struct)
12291 }
12292 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12293 let mut __tmp = BytesMut::new(bytes);
12294 #[allow(clippy::absurd_extreme_comparisons)]
12295 #[allow(unused_comparisons)]
12296 if __tmp.remaining() < Self::ENCODED_LEN {
12297 panic!(
12298 "buffer is too small (need {} bytes, but got {})",
12299 Self::ENCODED_LEN,
12300 __tmp.remaining(),
12301 )
12302 }
12303 __tmp.put_u32_le(self.size);
12304 __tmp.put_u16_le(self.width);
12305 __tmp.put_u16_le(self.height);
12306 __tmp.put_u16_le(self.packets);
12307 __tmp.put_u8(self.mavtype as u8);
12308 __tmp.put_u8(self.payload);
12309 __tmp.put_u8(self.jpg_quality);
12310 if matches!(version, MavlinkVersion::V2) {
12311 let len = __tmp.len();
12312 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12313 } else {
12314 __tmp.len()
12315 }
12316 }
12317}
12318#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
12319#[doc = ""]
12320#[doc = "ID: 254"]
12321#[derive(Debug, Clone, PartialEq)]
12322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12324#[cfg_attr(feature = "ts", derive(TS))]
12325#[cfg_attr(feature = "ts", ts(export))]
12326pub struct DEBUG_DATA {
12327 #[doc = "Timestamp (time since system boot)."]
12328 pub time_boot_ms: u32,
12329 #[doc = "DEBUG value"]
12330 pub value: f32,
12331 #[doc = "index of debug variable"]
12332 pub ind: u8,
12333}
12334impl DEBUG_DATA {
12335 pub const ENCODED_LEN: usize = 9usize;
12336 pub const DEFAULT: Self = Self {
12337 time_boot_ms: 0_u32,
12338 value: 0.0_f32,
12339 ind: 0_u8,
12340 };
12341 #[cfg(feature = "arbitrary")]
12342 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12343 use arbitrary::{Arbitrary, Unstructured};
12344 let mut buf = [0u8; 1024];
12345 rng.fill_bytes(&mut buf);
12346 let mut unstructured = Unstructured::new(&buf);
12347 Self::arbitrary(&mut unstructured).unwrap_or_default()
12348 }
12349}
12350impl Default for DEBUG_DATA {
12351 fn default() -> Self {
12352 Self::DEFAULT.clone()
12353 }
12354}
12355impl MessageData for DEBUG_DATA {
12356 type Message = MavMessage;
12357 const ID: u32 = 254u32;
12358 const NAME: &'static str = "DEBUG";
12359 const EXTRA_CRC: u8 = 46u8;
12360 const ENCODED_LEN: usize = 9usize;
12361 fn deser(
12362 _version: MavlinkVersion,
12363 __input: &[u8],
12364 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12365 let avail_len = __input.len();
12366 let mut payload_buf = [0; Self::ENCODED_LEN];
12367 let mut buf = if avail_len < Self::ENCODED_LEN {
12368 payload_buf[0..avail_len].copy_from_slice(__input);
12369 Bytes::new(&payload_buf)
12370 } else {
12371 Bytes::new(__input)
12372 };
12373 let mut __struct = Self::default();
12374 __struct.time_boot_ms = buf.get_u32_le()?;
12375 __struct.value = buf.get_f32_le()?;
12376 __struct.ind = buf.get_u8()?;
12377 Ok(__struct)
12378 }
12379 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12380 let mut __tmp = BytesMut::new(bytes);
12381 #[allow(clippy::absurd_extreme_comparisons)]
12382 #[allow(unused_comparisons)]
12383 if __tmp.remaining() < Self::ENCODED_LEN {
12384 panic!(
12385 "buffer is too small (need {} bytes, but got {})",
12386 Self::ENCODED_LEN,
12387 __tmp.remaining(),
12388 )
12389 }
12390 __tmp.put_u32_le(self.time_boot_ms);
12391 __tmp.put_f32_le(self.value);
12392 __tmp.put_u8(self.ind);
12393 if matches!(version, MavlinkVersion::V2) {
12394 let len = __tmp.len();
12395 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12396 } else {
12397 __tmp.len()
12398 }
12399 }
12400}
12401#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
12402#[doc = ""]
12403#[doc = "ID: 350"]
12404#[derive(Debug, Clone, PartialEq)]
12405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12407#[cfg_attr(feature = "ts", derive(TS))]
12408#[cfg_attr(feature = "ts", ts(export))]
12409pub struct DEBUG_FLOAT_ARRAY_DATA {
12410 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12411 pub time_usec: u64,
12412 #[doc = "Unique ID used to discriminate between arrays"]
12413 pub array_id: u16,
12414 #[doc = "Name, for human-friendly display in a Ground Control Station"]
12415 #[cfg_attr(feature = "ts", ts(type = "string"))]
12416 pub name: CharArray<10>,
12417 #[doc = "data"]
12418 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12419 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12420 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12421 pub data: [f32; 58],
12422}
12423impl DEBUG_FLOAT_ARRAY_DATA {
12424 pub const ENCODED_LEN: usize = 252usize;
12425 pub const DEFAULT: Self = Self {
12426 time_usec: 0_u64,
12427 array_id: 0_u16,
12428 name: CharArray::new([0_u8; 10usize]),
12429 data: [0.0_f32; 58usize],
12430 };
12431 #[cfg(feature = "arbitrary")]
12432 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12433 use arbitrary::{Arbitrary, Unstructured};
12434 let mut buf = [0u8; 1024];
12435 rng.fill_bytes(&mut buf);
12436 let mut unstructured = Unstructured::new(&buf);
12437 Self::arbitrary(&mut unstructured).unwrap_or_default()
12438 }
12439}
12440impl Default for DEBUG_FLOAT_ARRAY_DATA {
12441 fn default() -> Self {
12442 Self::DEFAULT.clone()
12443 }
12444}
12445impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
12446 type Message = MavMessage;
12447 const ID: u32 = 350u32;
12448 const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
12449 const EXTRA_CRC: u8 = 232u8;
12450 const ENCODED_LEN: usize = 252usize;
12451 fn deser(
12452 _version: MavlinkVersion,
12453 __input: &[u8],
12454 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12455 let avail_len = __input.len();
12456 let mut payload_buf = [0; Self::ENCODED_LEN];
12457 let mut buf = if avail_len < Self::ENCODED_LEN {
12458 payload_buf[0..avail_len].copy_from_slice(__input);
12459 Bytes::new(&payload_buf)
12460 } else {
12461 Bytes::new(__input)
12462 };
12463 let mut __struct = Self::default();
12464 __struct.time_usec = buf.get_u64_le()?;
12465 __struct.array_id = buf.get_u16_le()?;
12466 let mut tmp = [0_u8; 10usize];
12467 for v in &mut tmp {
12468 *v = buf.get_u8()?;
12469 }
12470 __struct.name = CharArray::new(tmp);
12471 for v in &mut __struct.data {
12472 let val = buf.get_f32_le()?;
12473 *v = val;
12474 }
12475 Ok(__struct)
12476 }
12477 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12478 let mut __tmp = BytesMut::new(bytes);
12479 #[allow(clippy::absurd_extreme_comparisons)]
12480 #[allow(unused_comparisons)]
12481 if __tmp.remaining() < Self::ENCODED_LEN {
12482 panic!(
12483 "buffer is too small (need {} bytes, but got {})",
12484 Self::ENCODED_LEN,
12485 __tmp.remaining(),
12486 )
12487 }
12488 __tmp.put_u64_le(self.time_usec);
12489 __tmp.put_u16_le(self.array_id);
12490 for val in &self.name {
12491 __tmp.put_u8(*val);
12492 }
12493 if matches!(version, MavlinkVersion::V2) {
12494 for val in &self.data {
12495 __tmp.put_f32_le(*val);
12496 }
12497 let len = __tmp.len();
12498 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12499 } else {
12500 __tmp.len()
12501 }
12502 }
12503}
12504#[doc = "To debug something using a named 3D vector."]
12505#[doc = ""]
12506#[doc = "ID: 250"]
12507#[derive(Debug, Clone, PartialEq)]
12508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12510#[cfg_attr(feature = "ts", derive(TS))]
12511#[cfg_attr(feature = "ts", ts(export))]
12512pub struct DEBUG_VECT_DATA {
12513 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12514 pub time_usec: u64,
12515 #[doc = "x"]
12516 pub x: f32,
12517 #[doc = "y"]
12518 pub y: f32,
12519 #[doc = "z"]
12520 pub z: f32,
12521 #[doc = "Name"]
12522 #[cfg_attr(feature = "ts", ts(type = "string"))]
12523 pub name: CharArray<10>,
12524}
12525impl DEBUG_VECT_DATA {
12526 pub const ENCODED_LEN: usize = 30usize;
12527 pub const DEFAULT: Self = Self {
12528 time_usec: 0_u64,
12529 x: 0.0_f32,
12530 y: 0.0_f32,
12531 z: 0.0_f32,
12532 name: CharArray::new([0_u8; 10usize]),
12533 };
12534 #[cfg(feature = "arbitrary")]
12535 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12536 use arbitrary::{Arbitrary, Unstructured};
12537 let mut buf = [0u8; 1024];
12538 rng.fill_bytes(&mut buf);
12539 let mut unstructured = Unstructured::new(&buf);
12540 Self::arbitrary(&mut unstructured).unwrap_or_default()
12541 }
12542}
12543impl Default for DEBUG_VECT_DATA {
12544 fn default() -> Self {
12545 Self::DEFAULT.clone()
12546 }
12547}
12548impl MessageData for DEBUG_VECT_DATA {
12549 type Message = MavMessage;
12550 const ID: u32 = 250u32;
12551 const NAME: &'static str = "DEBUG_VECT";
12552 const EXTRA_CRC: u8 = 49u8;
12553 const ENCODED_LEN: usize = 30usize;
12554 fn deser(
12555 _version: MavlinkVersion,
12556 __input: &[u8],
12557 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12558 let avail_len = __input.len();
12559 let mut payload_buf = [0; Self::ENCODED_LEN];
12560 let mut buf = if avail_len < Self::ENCODED_LEN {
12561 payload_buf[0..avail_len].copy_from_slice(__input);
12562 Bytes::new(&payload_buf)
12563 } else {
12564 Bytes::new(__input)
12565 };
12566 let mut __struct = Self::default();
12567 __struct.time_usec = buf.get_u64_le()?;
12568 __struct.x = buf.get_f32_le()?;
12569 __struct.y = buf.get_f32_le()?;
12570 __struct.z = buf.get_f32_le()?;
12571 let mut tmp = [0_u8; 10usize];
12572 for v in &mut tmp {
12573 *v = buf.get_u8()?;
12574 }
12575 __struct.name = CharArray::new(tmp);
12576 Ok(__struct)
12577 }
12578 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12579 let mut __tmp = BytesMut::new(bytes);
12580 #[allow(clippy::absurd_extreme_comparisons)]
12581 #[allow(unused_comparisons)]
12582 if __tmp.remaining() < Self::ENCODED_LEN {
12583 panic!(
12584 "buffer is too small (need {} bytes, but got {})",
12585 Self::ENCODED_LEN,
12586 __tmp.remaining(),
12587 )
12588 }
12589 __tmp.put_u64_le(self.time_usec);
12590 __tmp.put_f32_le(self.x);
12591 __tmp.put_f32_le(self.y);
12592 __tmp.put_f32_le(self.z);
12593 for val in &self.name {
12594 __tmp.put_u8(*val);
12595 }
12596 if matches!(version, MavlinkVersion::V2) {
12597 let len = __tmp.len();
12598 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12599 } else {
12600 __tmp.len()
12601 }
12602 }
12603}
12604#[doc = "Distance sensor information for an onboard rangefinder."]
12605#[doc = ""]
12606#[doc = "ID: 132"]
12607#[derive(Debug, Clone, PartialEq)]
12608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12610#[cfg_attr(feature = "ts", derive(TS))]
12611#[cfg_attr(feature = "ts", ts(export))]
12612pub struct DISTANCE_SENSOR_DATA {
12613 #[doc = "Timestamp (time since system boot)."]
12614 pub time_boot_ms: u32,
12615 #[doc = "Minimum distance the sensor can measure"]
12616 pub min_distance: u16,
12617 #[doc = "Maximum distance the sensor can measure"]
12618 pub max_distance: u16,
12619 #[doc = "Current distance reading"]
12620 pub current_distance: u16,
12621 #[doc = "Type of distance sensor."]
12622 pub mavtype: MavDistanceSensor,
12623 #[doc = "Onboard ID of the sensor"]
12624 pub id: u8,
12625 #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
12626 pub orientation: MavSensorOrientation,
12627 #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
12628 pub covariance: u8,
12629 #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
12630 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12631 pub horizontal_fov: f32,
12632 #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
12633 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12634 pub vertical_fov: f32,
12635 #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
12636 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12637 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12638 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12639 pub quaternion: [f32; 4],
12640 #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
12641 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12642 pub signal_quality: u8,
12643}
12644impl DISTANCE_SENSOR_DATA {
12645 pub const ENCODED_LEN: usize = 39usize;
12646 pub const DEFAULT: Self = Self {
12647 time_boot_ms: 0_u32,
12648 min_distance: 0_u16,
12649 max_distance: 0_u16,
12650 current_distance: 0_u16,
12651 mavtype: MavDistanceSensor::DEFAULT,
12652 id: 0_u8,
12653 orientation: MavSensorOrientation::DEFAULT,
12654 covariance: 0_u8,
12655 horizontal_fov: 0.0_f32,
12656 vertical_fov: 0.0_f32,
12657 quaternion: [0.0_f32; 4usize],
12658 signal_quality: 0_u8,
12659 };
12660 #[cfg(feature = "arbitrary")]
12661 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12662 use arbitrary::{Arbitrary, Unstructured};
12663 let mut buf = [0u8; 1024];
12664 rng.fill_bytes(&mut buf);
12665 let mut unstructured = Unstructured::new(&buf);
12666 Self::arbitrary(&mut unstructured).unwrap_or_default()
12667 }
12668}
12669impl Default for DISTANCE_SENSOR_DATA {
12670 fn default() -> Self {
12671 Self::DEFAULT.clone()
12672 }
12673}
12674impl MessageData for DISTANCE_SENSOR_DATA {
12675 type Message = MavMessage;
12676 const ID: u32 = 132u32;
12677 const NAME: &'static str = "DISTANCE_SENSOR";
12678 const EXTRA_CRC: u8 = 85u8;
12679 const ENCODED_LEN: usize = 39usize;
12680 fn deser(
12681 _version: MavlinkVersion,
12682 __input: &[u8],
12683 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12684 let avail_len = __input.len();
12685 let mut payload_buf = [0; Self::ENCODED_LEN];
12686 let mut buf = if avail_len < Self::ENCODED_LEN {
12687 payload_buf[0..avail_len].copy_from_slice(__input);
12688 Bytes::new(&payload_buf)
12689 } else {
12690 Bytes::new(__input)
12691 };
12692 let mut __struct = Self::default();
12693 __struct.time_boot_ms = buf.get_u32_le()?;
12694 __struct.min_distance = buf.get_u16_le()?;
12695 __struct.max_distance = buf.get_u16_le()?;
12696 __struct.current_distance = buf.get_u16_le()?;
12697 let tmp = buf.get_u8()?;
12698 __struct.mavtype =
12699 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12700 enum_type: "MavDistanceSensor",
12701 value: tmp as u64,
12702 })?;
12703 __struct.id = buf.get_u8()?;
12704 let tmp = buf.get_u8()?;
12705 __struct.orientation =
12706 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12707 enum_type: "MavSensorOrientation",
12708 value: tmp as u64,
12709 })?;
12710 __struct.covariance = buf.get_u8()?;
12711 __struct.horizontal_fov = buf.get_f32_le()?;
12712 __struct.vertical_fov = buf.get_f32_le()?;
12713 for v in &mut __struct.quaternion {
12714 let val = buf.get_f32_le()?;
12715 *v = val;
12716 }
12717 __struct.signal_quality = buf.get_u8()?;
12718 Ok(__struct)
12719 }
12720 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12721 let mut __tmp = BytesMut::new(bytes);
12722 #[allow(clippy::absurd_extreme_comparisons)]
12723 #[allow(unused_comparisons)]
12724 if __tmp.remaining() < Self::ENCODED_LEN {
12725 panic!(
12726 "buffer is too small (need {} bytes, but got {})",
12727 Self::ENCODED_LEN,
12728 __tmp.remaining(),
12729 )
12730 }
12731 __tmp.put_u32_le(self.time_boot_ms);
12732 __tmp.put_u16_le(self.min_distance);
12733 __tmp.put_u16_le(self.max_distance);
12734 __tmp.put_u16_le(self.current_distance);
12735 __tmp.put_u8(self.mavtype as u8);
12736 __tmp.put_u8(self.id);
12737 __tmp.put_u8(self.orientation as u8);
12738 __tmp.put_u8(self.covariance);
12739 if matches!(version, MavlinkVersion::V2) {
12740 __tmp.put_f32_le(self.horizontal_fov);
12741 __tmp.put_f32_le(self.vertical_fov);
12742 for val in &self.quaternion {
12743 __tmp.put_f32_le(*val);
12744 }
12745 __tmp.put_u8(self.signal_quality);
12746 let len = __tmp.len();
12747 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12748 } else {
12749 __tmp.len()
12750 }
12751 }
12752}
12753#[doc = "EFI status output."]
12754#[doc = ""]
12755#[doc = "ID: 225"]
12756#[derive(Debug, Clone, PartialEq)]
12757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12759#[cfg_attr(feature = "ts", derive(TS))]
12760#[cfg_attr(feature = "ts", ts(export))]
12761pub struct EFI_STATUS_DATA {
12762 #[doc = "ECU index"]
12763 pub ecu_index: f32,
12764 #[doc = "RPM"]
12765 pub rpm: f32,
12766 #[doc = "Fuel consumed"]
12767 pub fuel_consumed: f32,
12768 #[doc = "Fuel flow rate"]
12769 pub fuel_flow: f32,
12770 #[doc = "Engine load"]
12771 pub engine_load: f32,
12772 #[doc = "Throttle position"]
12773 pub throttle_position: f32,
12774 #[doc = "Spark dwell time"]
12775 pub spark_dwell_time: f32,
12776 #[doc = "Barometric pressure"]
12777 pub barometric_pressure: f32,
12778 #[doc = "Intake manifold pressure("]
12779 pub intake_manifold_pressure: f32,
12780 #[doc = "Intake manifold temperature"]
12781 pub intake_manifold_temperature: f32,
12782 #[doc = "Cylinder head temperature"]
12783 pub cylinder_head_temperature: f32,
12784 #[doc = "Ignition timing (Crank angle degrees)"]
12785 pub ignition_timing: f32,
12786 #[doc = "Injection time"]
12787 pub injection_time: f32,
12788 #[doc = "Exhaust gas temperature"]
12789 pub exhaust_gas_temperature: f32,
12790 #[doc = "Output throttle"]
12791 pub throttle_out: f32,
12792 #[doc = "Pressure/temperature compensation"]
12793 pub pt_compensation: f32,
12794 #[doc = "EFI health status"]
12795 pub health: u8,
12796 #[doc = "Supply voltage to EFI sparking system. Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
12797 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12798 pub ignition_voltage: f32,
12799 #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
12800 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12801 pub fuel_pressure: f32,
12802}
12803impl EFI_STATUS_DATA {
12804 pub const ENCODED_LEN: usize = 73usize;
12805 pub const DEFAULT: Self = Self {
12806 ecu_index: 0.0_f32,
12807 rpm: 0.0_f32,
12808 fuel_consumed: 0.0_f32,
12809 fuel_flow: 0.0_f32,
12810 engine_load: 0.0_f32,
12811 throttle_position: 0.0_f32,
12812 spark_dwell_time: 0.0_f32,
12813 barometric_pressure: 0.0_f32,
12814 intake_manifold_pressure: 0.0_f32,
12815 intake_manifold_temperature: 0.0_f32,
12816 cylinder_head_temperature: 0.0_f32,
12817 ignition_timing: 0.0_f32,
12818 injection_time: 0.0_f32,
12819 exhaust_gas_temperature: 0.0_f32,
12820 throttle_out: 0.0_f32,
12821 pt_compensation: 0.0_f32,
12822 health: 0_u8,
12823 ignition_voltage: 0.0_f32,
12824 fuel_pressure: 0.0_f32,
12825 };
12826 #[cfg(feature = "arbitrary")]
12827 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12828 use arbitrary::{Arbitrary, Unstructured};
12829 let mut buf = [0u8; 1024];
12830 rng.fill_bytes(&mut buf);
12831 let mut unstructured = Unstructured::new(&buf);
12832 Self::arbitrary(&mut unstructured).unwrap_or_default()
12833 }
12834}
12835impl Default for EFI_STATUS_DATA {
12836 fn default() -> Self {
12837 Self::DEFAULT.clone()
12838 }
12839}
12840impl MessageData for EFI_STATUS_DATA {
12841 type Message = MavMessage;
12842 const ID: u32 = 225u32;
12843 const NAME: &'static str = "EFI_STATUS";
12844 const EXTRA_CRC: u8 = 208u8;
12845 const ENCODED_LEN: usize = 73usize;
12846 fn deser(
12847 _version: MavlinkVersion,
12848 __input: &[u8],
12849 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12850 let avail_len = __input.len();
12851 let mut payload_buf = [0; Self::ENCODED_LEN];
12852 let mut buf = if avail_len < Self::ENCODED_LEN {
12853 payload_buf[0..avail_len].copy_from_slice(__input);
12854 Bytes::new(&payload_buf)
12855 } else {
12856 Bytes::new(__input)
12857 };
12858 let mut __struct = Self::default();
12859 __struct.ecu_index = buf.get_f32_le()?;
12860 __struct.rpm = buf.get_f32_le()?;
12861 __struct.fuel_consumed = buf.get_f32_le()?;
12862 __struct.fuel_flow = buf.get_f32_le()?;
12863 __struct.engine_load = buf.get_f32_le()?;
12864 __struct.throttle_position = buf.get_f32_le()?;
12865 __struct.spark_dwell_time = buf.get_f32_le()?;
12866 __struct.barometric_pressure = buf.get_f32_le()?;
12867 __struct.intake_manifold_pressure = buf.get_f32_le()?;
12868 __struct.intake_manifold_temperature = buf.get_f32_le()?;
12869 __struct.cylinder_head_temperature = buf.get_f32_le()?;
12870 __struct.ignition_timing = buf.get_f32_le()?;
12871 __struct.injection_time = buf.get_f32_le()?;
12872 __struct.exhaust_gas_temperature = buf.get_f32_le()?;
12873 __struct.throttle_out = buf.get_f32_le()?;
12874 __struct.pt_compensation = buf.get_f32_le()?;
12875 __struct.health = buf.get_u8()?;
12876 __struct.ignition_voltage = buf.get_f32_le()?;
12877 __struct.fuel_pressure = buf.get_f32_le()?;
12878 Ok(__struct)
12879 }
12880 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12881 let mut __tmp = BytesMut::new(bytes);
12882 #[allow(clippy::absurd_extreme_comparisons)]
12883 #[allow(unused_comparisons)]
12884 if __tmp.remaining() < Self::ENCODED_LEN {
12885 panic!(
12886 "buffer is too small (need {} bytes, but got {})",
12887 Self::ENCODED_LEN,
12888 __tmp.remaining(),
12889 )
12890 }
12891 __tmp.put_f32_le(self.ecu_index);
12892 __tmp.put_f32_le(self.rpm);
12893 __tmp.put_f32_le(self.fuel_consumed);
12894 __tmp.put_f32_le(self.fuel_flow);
12895 __tmp.put_f32_le(self.engine_load);
12896 __tmp.put_f32_le(self.throttle_position);
12897 __tmp.put_f32_le(self.spark_dwell_time);
12898 __tmp.put_f32_le(self.barometric_pressure);
12899 __tmp.put_f32_le(self.intake_manifold_pressure);
12900 __tmp.put_f32_le(self.intake_manifold_temperature);
12901 __tmp.put_f32_le(self.cylinder_head_temperature);
12902 __tmp.put_f32_le(self.ignition_timing);
12903 __tmp.put_f32_le(self.injection_time);
12904 __tmp.put_f32_le(self.exhaust_gas_temperature);
12905 __tmp.put_f32_le(self.throttle_out);
12906 __tmp.put_f32_le(self.pt_compensation);
12907 __tmp.put_u8(self.health);
12908 if matches!(version, MavlinkVersion::V2) {
12909 __tmp.put_f32_le(self.ignition_voltage);
12910 __tmp.put_f32_le(self.fuel_pressure);
12911 let len = __tmp.len();
12912 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12913 } else {
12914 __tmp.len()
12915 }
12916 }
12917}
12918#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
12919#[doc = ""]
12920#[doc = "ID: 131"]
12921#[derive(Debug, Clone, PartialEq)]
12922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12924#[cfg_attr(feature = "ts", derive(TS))]
12925#[cfg_attr(feature = "ts", ts(export))]
12926pub struct ENCAPSULATED_DATA_DATA {
12927 #[doc = "sequence number (starting with 0 on every transmission)"]
12928 pub seqnr: u16,
12929 #[doc = "image data bytes"]
12930 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12931 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12932 pub data: [u8; 253],
12933}
12934impl ENCAPSULATED_DATA_DATA {
12935 pub const ENCODED_LEN: usize = 255usize;
12936 pub const DEFAULT: Self = Self {
12937 seqnr: 0_u16,
12938 data: [0_u8; 253usize],
12939 };
12940 #[cfg(feature = "arbitrary")]
12941 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12942 use arbitrary::{Arbitrary, Unstructured};
12943 let mut buf = [0u8; 1024];
12944 rng.fill_bytes(&mut buf);
12945 let mut unstructured = Unstructured::new(&buf);
12946 Self::arbitrary(&mut unstructured).unwrap_or_default()
12947 }
12948}
12949impl Default for ENCAPSULATED_DATA_DATA {
12950 fn default() -> Self {
12951 Self::DEFAULT.clone()
12952 }
12953}
12954impl MessageData for ENCAPSULATED_DATA_DATA {
12955 type Message = MavMessage;
12956 const ID: u32 = 131u32;
12957 const NAME: &'static str = "ENCAPSULATED_DATA";
12958 const EXTRA_CRC: u8 = 223u8;
12959 const ENCODED_LEN: usize = 255usize;
12960 fn deser(
12961 _version: MavlinkVersion,
12962 __input: &[u8],
12963 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12964 let avail_len = __input.len();
12965 let mut payload_buf = [0; Self::ENCODED_LEN];
12966 let mut buf = if avail_len < Self::ENCODED_LEN {
12967 payload_buf[0..avail_len].copy_from_slice(__input);
12968 Bytes::new(&payload_buf)
12969 } else {
12970 Bytes::new(__input)
12971 };
12972 let mut __struct = Self::default();
12973 __struct.seqnr = buf.get_u16_le()?;
12974 for v in &mut __struct.data {
12975 let val = buf.get_u8()?;
12976 *v = val;
12977 }
12978 Ok(__struct)
12979 }
12980 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12981 let mut __tmp = BytesMut::new(bytes);
12982 #[allow(clippy::absurd_extreme_comparisons)]
12983 #[allow(unused_comparisons)]
12984 if __tmp.remaining() < Self::ENCODED_LEN {
12985 panic!(
12986 "buffer is too small (need {} bytes, but got {})",
12987 Self::ENCODED_LEN,
12988 __tmp.remaining(),
12989 )
12990 }
12991 __tmp.put_u16_le(self.seqnr);
12992 for val in &self.data {
12993 __tmp.put_u8(*val);
12994 }
12995 if matches!(version, MavlinkVersion::V2) {
12996 let len = __tmp.len();
12997 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12998 } else {
12999 __tmp.len()
13000 }
13001 }
13002}
13003#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
13004#[doc = ""]
13005#[doc = "ID: 290"]
13006#[derive(Debug, Clone, PartialEq)]
13007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13009#[cfg_attr(feature = "ts", derive(TS))]
13010#[cfg_attr(feature = "ts", ts(export))]
13011pub struct ESC_INFO_DATA {
13012 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
13013 pub time_usec: u64,
13014 #[doc = "Number of reported errors by each ESC since boot."]
13015 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13016 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13017 pub error_count: [u32; 4],
13018 #[doc = "Counter of data packets received."]
13019 pub counter: u16,
13020 #[doc = "Bitmap of ESC failure flags."]
13021 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13022 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13023 pub failure_flags: [u16; 4],
13024 #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
13025 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13026 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13027 pub temperature: [i16; 4],
13028 #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
13029 pub index: u8,
13030 #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
13031 pub count: u8,
13032 #[doc = "Connection type protocol for all ESC."]
13033 pub connection_type: EscConnectionType,
13034 #[doc = "Information regarding online/offline status of each ESC."]
13035 pub info: u8,
13036}
13037impl ESC_INFO_DATA {
13038 pub const ENCODED_LEN: usize = 46usize;
13039 pub const DEFAULT: Self = Self {
13040 time_usec: 0_u64,
13041 error_count: [0_u32; 4usize],
13042 counter: 0_u16,
13043 failure_flags: [0_u16; 4usize],
13044 temperature: [0_i16; 4usize],
13045 index: 0_u8,
13046 count: 0_u8,
13047 connection_type: EscConnectionType::DEFAULT,
13048 info: 0_u8,
13049 };
13050 #[cfg(feature = "arbitrary")]
13051 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13052 use arbitrary::{Arbitrary, Unstructured};
13053 let mut buf = [0u8; 1024];
13054 rng.fill_bytes(&mut buf);
13055 let mut unstructured = Unstructured::new(&buf);
13056 Self::arbitrary(&mut unstructured).unwrap_or_default()
13057 }
13058}
13059impl Default for ESC_INFO_DATA {
13060 fn default() -> Self {
13061 Self::DEFAULT.clone()
13062 }
13063}
13064impl MessageData for ESC_INFO_DATA {
13065 type Message = MavMessage;
13066 const ID: u32 = 290u32;
13067 const NAME: &'static str = "ESC_INFO";
13068 const EXTRA_CRC: u8 = 251u8;
13069 const ENCODED_LEN: usize = 46usize;
13070 fn deser(
13071 _version: MavlinkVersion,
13072 __input: &[u8],
13073 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13074 let avail_len = __input.len();
13075 let mut payload_buf = [0; Self::ENCODED_LEN];
13076 let mut buf = if avail_len < Self::ENCODED_LEN {
13077 payload_buf[0..avail_len].copy_from_slice(__input);
13078 Bytes::new(&payload_buf)
13079 } else {
13080 Bytes::new(__input)
13081 };
13082 let mut __struct = Self::default();
13083 __struct.time_usec = buf.get_u64_le()?;
13084 for v in &mut __struct.error_count {
13085 let val = buf.get_u32_le()?;
13086 *v = val;
13087 }
13088 __struct.counter = buf.get_u16_le()?;
13089 for v in &mut __struct.failure_flags {
13090 let val = buf.get_u16_le()?;
13091 *v = val;
13092 }
13093 for v in &mut __struct.temperature {
13094 let val = buf.get_i16_le()?;
13095 *v = val;
13096 }
13097 __struct.index = buf.get_u8()?;
13098 __struct.count = buf.get_u8()?;
13099 let tmp = buf.get_u8()?;
13100 __struct.connection_type =
13101 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13102 enum_type: "EscConnectionType",
13103 value: tmp as u64,
13104 })?;
13105 __struct.info = buf.get_u8()?;
13106 Ok(__struct)
13107 }
13108 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13109 let mut __tmp = BytesMut::new(bytes);
13110 #[allow(clippy::absurd_extreme_comparisons)]
13111 #[allow(unused_comparisons)]
13112 if __tmp.remaining() < Self::ENCODED_LEN {
13113 panic!(
13114 "buffer is too small (need {} bytes, but got {})",
13115 Self::ENCODED_LEN,
13116 __tmp.remaining(),
13117 )
13118 }
13119 __tmp.put_u64_le(self.time_usec);
13120 for val in &self.error_count {
13121 __tmp.put_u32_le(*val);
13122 }
13123 __tmp.put_u16_le(self.counter);
13124 for val in &self.failure_flags {
13125 __tmp.put_u16_le(*val);
13126 }
13127 for val in &self.temperature {
13128 __tmp.put_i16_le(*val);
13129 }
13130 __tmp.put_u8(self.index);
13131 __tmp.put_u8(self.count);
13132 __tmp.put_u8(self.connection_type as u8);
13133 __tmp.put_u8(self.info);
13134 if matches!(version, MavlinkVersion::V2) {
13135 let len = __tmp.len();
13136 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13137 } else {
13138 __tmp.len()
13139 }
13140 }
13141}
13142#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
13143#[doc = ""]
13144#[doc = "ID: 291"]
13145#[derive(Debug, Clone, PartialEq)]
13146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13148#[cfg_attr(feature = "ts", derive(TS))]
13149#[cfg_attr(feature = "ts", ts(export))]
13150pub struct ESC_STATUS_DATA {
13151 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
13152 pub time_usec: u64,
13153 #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
13154 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13155 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13156 pub rpm: [i32; 4],
13157 #[doc = "Voltage measured from each ESC."]
13158 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13159 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13160 pub voltage: [f32; 4],
13161 #[doc = "Current measured from each ESC."]
13162 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13163 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13164 pub current: [f32; 4],
13165 #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
13166 pub index: u8,
13167}
13168impl ESC_STATUS_DATA {
13169 pub const ENCODED_LEN: usize = 57usize;
13170 pub const DEFAULT: Self = Self {
13171 time_usec: 0_u64,
13172 rpm: [0_i32; 4usize],
13173 voltage: [0.0_f32; 4usize],
13174 current: [0.0_f32; 4usize],
13175 index: 0_u8,
13176 };
13177 #[cfg(feature = "arbitrary")]
13178 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13179 use arbitrary::{Arbitrary, Unstructured};
13180 let mut buf = [0u8; 1024];
13181 rng.fill_bytes(&mut buf);
13182 let mut unstructured = Unstructured::new(&buf);
13183 Self::arbitrary(&mut unstructured).unwrap_or_default()
13184 }
13185}
13186impl Default for ESC_STATUS_DATA {
13187 fn default() -> Self {
13188 Self::DEFAULT.clone()
13189 }
13190}
13191impl MessageData for ESC_STATUS_DATA {
13192 type Message = MavMessage;
13193 const ID: u32 = 291u32;
13194 const NAME: &'static str = "ESC_STATUS";
13195 const EXTRA_CRC: u8 = 10u8;
13196 const ENCODED_LEN: usize = 57usize;
13197 fn deser(
13198 _version: MavlinkVersion,
13199 __input: &[u8],
13200 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13201 let avail_len = __input.len();
13202 let mut payload_buf = [0; Self::ENCODED_LEN];
13203 let mut buf = if avail_len < Self::ENCODED_LEN {
13204 payload_buf[0..avail_len].copy_from_slice(__input);
13205 Bytes::new(&payload_buf)
13206 } else {
13207 Bytes::new(__input)
13208 };
13209 let mut __struct = Self::default();
13210 __struct.time_usec = buf.get_u64_le()?;
13211 for v in &mut __struct.rpm {
13212 let val = buf.get_i32_le()?;
13213 *v = val;
13214 }
13215 for v in &mut __struct.voltage {
13216 let val = buf.get_f32_le()?;
13217 *v = val;
13218 }
13219 for v in &mut __struct.current {
13220 let val = buf.get_f32_le()?;
13221 *v = val;
13222 }
13223 __struct.index = buf.get_u8()?;
13224 Ok(__struct)
13225 }
13226 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13227 let mut __tmp = BytesMut::new(bytes);
13228 #[allow(clippy::absurd_extreme_comparisons)]
13229 #[allow(unused_comparisons)]
13230 if __tmp.remaining() < Self::ENCODED_LEN {
13231 panic!(
13232 "buffer is too small (need {} bytes, but got {})",
13233 Self::ENCODED_LEN,
13234 __tmp.remaining(),
13235 )
13236 }
13237 __tmp.put_u64_le(self.time_usec);
13238 for val in &self.rpm {
13239 __tmp.put_i32_le(*val);
13240 }
13241 for val in &self.voltage {
13242 __tmp.put_f32_le(*val);
13243 }
13244 for val in &self.current {
13245 __tmp.put_f32_le(*val);
13246 }
13247 __tmp.put_u8(self.index);
13248 if matches!(version, MavlinkVersion::V2) {
13249 let len = __tmp.len();
13250 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13251 } else {
13252 __tmp.len()
13253 }
13254 }
13255}
13256#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
13257#[doc = ""]
13258#[doc = "ID: 230"]
13259#[derive(Debug, Clone, PartialEq)]
13260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13262#[cfg_attr(feature = "ts", derive(TS))]
13263#[cfg_attr(feature = "ts", ts(export))]
13264pub struct ESTIMATOR_STATUS_DATA {
13265 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13266 pub time_usec: u64,
13267 #[doc = "Velocity innovation test ratio"]
13268 pub vel_ratio: f32,
13269 #[doc = "Horizontal position innovation test ratio"]
13270 pub pos_horiz_ratio: f32,
13271 #[doc = "Vertical position innovation test ratio"]
13272 pub pos_vert_ratio: f32,
13273 #[doc = "Magnetometer innovation test ratio"]
13274 pub mag_ratio: f32,
13275 #[doc = "Height above terrain innovation test ratio"]
13276 pub hagl_ratio: f32,
13277 #[doc = "True airspeed innovation test ratio"]
13278 pub tas_ratio: f32,
13279 #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
13280 pub pos_horiz_accuracy: f32,
13281 #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
13282 pub pos_vert_accuracy: f32,
13283 #[doc = "Bitmap indicating which EKF outputs are valid."]
13284 pub flags: EstimatorStatusFlags,
13285}
13286impl ESTIMATOR_STATUS_DATA {
13287 pub const ENCODED_LEN: usize = 42usize;
13288 pub const DEFAULT: Self = Self {
13289 time_usec: 0_u64,
13290 vel_ratio: 0.0_f32,
13291 pos_horiz_ratio: 0.0_f32,
13292 pos_vert_ratio: 0.0_f32,
13293 mag_ratio: 0.0_f32,
13294 hagl_ratio: 0.0_f32,
13295 tas_ratio: 0.0_f32,
13296 pos_horiz_accuracy: 0.0_f32,
13297 pos_vert_accuracy: 0.0_f32,
13298 flags: EstimatorStatusFlags::DEFAULT,
13299 };
13300 #[cfg(feature = "arbitrary")]
13301 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13302 use arbitrary::{Arbitrary, Unstructured};
13303 let mut buf = [0u8; 1024];
13304 rng.fill_bytes(&mut buf);
13305 let mut unstructured = Unstructured::new(&buf);
13306 Self::arbitrary(&mut unstructured).unwrap_or_default()
13307 }
13308}
13309impl Default for ESTIMATOR_STATUS_DATA {
13310 fn default() -> Self {
13311 Self::DEFAULT.clone()
13312 }
13313}
13314impl MessageData for ESTIMATOR_STATUS_DATA {
13315 type Message = MavMessage;
13316 const ID: u32 = 230u32;
13317 const NAME: &'static str = "ESTIMATOR_STATUS";
13318 const EXTRA_CRC: u8 = 163u8;
13319 const ENCODED_LEN: usize = 42usize;
13320 fn deser(
13321 _version: MavlinkVersion,
13322 __input: &[u8],
13323 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13324 let avail_len = __input.len();
13325 let mut payload_buf = [0; Self::ENCODED_LEN];
13326 let mut buf = if avail_len < Self::ENCODED_LEN {
13327 payload_buf[0..avail_len].copy_from_slice(__input);
13328 Bytes::new(&payload_buf)
13329 } else {
13330 Bytes::new(__input)
13331 };
13332 let mut __struct = Self::default();
13333 __struct.time_usec = buf.get_u64_le()?;
13334 __struct.vel_ratio = buf.get_f32_le()?;
13335 __struct.pos_horiz_ratio = buf.get_f32_le()?;
13336 __struct.pos_vert_ratio = buf.get_f32_le()?;
13337 __struct.mag_ratio = buf.get_f32_le()?;
13338 __struct.hagl_ratio = buf.get_f32_le()?;
13339 __struct.tas_ratio = buf.get_f32_le()?;
13340 __struct.pos_horiz_accuracy = buf.get_f32_le()?;
13341 __struct.pos_vert_accuracy = buf.get_f32_le()?;
13342 let tmp = buf.get_u16_le()?;
13343 __struct.flags = EstimatorStatusFlags::from_bits(
13344 tmp as <EstimatorStatusFlags as Flags>::Bits,
13345 )
13346 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13347 flag_type: "EstimatorStatusFlags",
13348 value: tmp as u64,
13349 })?;
13350 Ok(__struct)
13351 }
13352 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13353 let mut __tmp = BytesMut::new(bytes);
13354 #[allow(clippy::absurd_extreme_comparisons)]
13355 #[allow(unused_comparisons)]
13356 if __tmp.remaining() < Self::ENCODED_LEN {
13357 panic!(
13358 "buffer is too small (need {} bytes, but got {})",
13359 Self::ENCODED_LEN,
13360 __tmp.remaining(),
13361 )
13362 }
13363 __tmp.put_u64_le(self.time_usec);
13364 __tmp.put_f32_le(self.vel_ratio);
13365 __tmp.put_f32_le(self.pos_horiz_ratio);
13366 __tmp.put_f32_le(self.pos_vert_ratio);
13367 __tmp.put_f32_le(self.mag_ratio);
13368 __tmp.put_f32_le(self.hagl_ratio);
13369 __tmp.put_f32_le(self.tas_ratio);
13370 __tmp.put_f32_le(self.pos_horiz_accuracy);
13371 __tmp.put_f32_le(self.pos_vert_accuracy);
13372 __tmp.put_u16_le(self.flags.bits() as u16);
13373 if matches!(version, MavlinkVersion::V2) {
13374 let len = __tmp.len();
13375 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13376 } else {
13377 __tmp.len()
13378 }
13379 }
13380}
13381#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
13382#[doc = ""]
13383#[doc = "ID: 410"]
13384#[derive(Debug, Clone, PartialEq)]
13385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13387#[cfg_attr(feature = "ts", derive(TS))]
13388#[cfg_attr(feature = "ts", ts(export))]
13389pub struct EVENT_DATA {
13390 #[doc = "Event ID (as defined in the component metadata)"]
13391 pub id: u32,
13392 #[doc = "Timestamp (time since system boot when the event happened)."]
13393 pub event_time_boot_ms: u32,
13394 #[doc = "Sequence number."]
13395 pub sequence: u16,
13396 #[doc = "Component ID"]
13397 pub destination_component: u8,
13398 #[doc = "System ID"]
13399 pub destination_system: u8,
13400 #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
13401 pub log_levels: u8,
13402 #[doc = "Arguments (depend on event ID)."]
13403 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13404 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13405 pub arguments: [u8; 40],
13406}
13407impl EVENT_DATA {
13408 pub const ENCODED_LEN: usize = 53usize;
13409 pub const DEFAULT: Self = Self {
13410 id: 0_u32,
13411 event_time_boot_ms: 0_u32,
13412 sequence: 0_u16,
13413 destination_component: 0_u8,
13414 destination_system: 0_u8,
13415 log_levels: 0_u8,
13416 arguments: [0_u8; 40usize],
13417 };
13418 #[cfg(feature = "arbitrary")]
13419 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13420 use arbitrary::{Arbitrary, Unstructured};
13421 let mut buf = [0u8; 1024];
13422 rng.fill_bytes(&mut buf);
13423 let mut unstructured = Unstructured::new(&buf);
13424 Self::arbitrary(&mut unstructured).unwrap_or_default()
13425 }
13426}
13427impl Default for EVENT_DATA {
13428 fn default() -> Self {
13429 Self::DEFAULT.clone()
13430 }
13431}
13432impl MessageData for EVENT_DATA {
13433 type Message = MavMessage;
13434 const ID: u32 = 410u32;
13435 const NAME: &'static str = "EVENT";
13436 const EXTRA_CRC: u8 = 160u8;
13437 const ENCODED_LEN: usize = 53usize;
13438 fn deser(
13439 _version: MavlinkVersion,
13440 __input: &[u8],
13441 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13442 let avail_len = __input.len();
13443 let mut payload_buf = [0; Self::ENCODED_LEN];
13444 let mut buf = if avail_len < Self::ENCODED_LEN {
13445 payload_buf[0..avail_len].copy_from_slice(__input);
13446 Bytes::new(&payload_buf)
13447 } else {
13448 Bytes::new(__input)
13449 };
13450 let mut __struct = Self::default();
13451 __struct.id = buf.get_u32_le()?;
13452 __struct.event_time_boot_ms = buf.get_u32_le()?;
13453 __struct.sequence = buf.get_u16_le()?;
13454 __struct.destination_component = buf.get_u8()?;
13455 __struct.destination_system = buf.get_u8()?;
13456 __struct.log_levels = buf.get_u8()?;
13457 for v in &mut __struct.arguments {
13458 let val = buf.get_u8()?;
13459 *v = val;
13460 }
13461 Ok(__struct)
13462 }
13463 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13464 let mut __tmp = BytesMut::new(bytes);
13465 #[allow(clippy::absurd_extreme_comparisons)]
13466 #[allow(unused_comparisons)]
13467 if __tmp.remaining() < Self::ENCODED_LEN {
13468 panic!(
13469 "buffer is too small (need {} bytes, but got {})",
13470 Self::ENCODED_LEN,
13471 __tmp.remaining(),
13472 )
13473 }
13474 __tmp.put_u32_le(self.id);
13475 __tmp.put_u32_le(self.event_time_boot_ms);
13476 __tmp.put_u16_le(self.sequence);
13477 __tmp.put_u8(self.destination_component);
13478 __tmp.put_u8(self.destination_system);
13479 __tmp.put_u8(self.log_levels);
13480 for val in &self.arguments {
13481 __tmp.put_u8(*val);
13482 }
13483 if matches!(version, MavlinkVersion::V2) {
13484 let len = __tmp.len();
13485 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13486 } else {
13487 __tmp.len()
13488 }
13489 }
13490}
13491#[doc = "Provides state for additional features."]
13492#[doc = ""]
13493#[doc = "ID: 245"]
13494#[derive(Debug, Clone, PartialEq)]
13495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13497#[cfg_attr(feature = "ts", derive(TS))]
13498#[cfg_attr(feature = "ts", ts(export))]
13499pub struct EXTENDED_SYS_STATE_DATA {
13500 #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
13501 pub vtol_state: MavVtolState,
13502 #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
13503 pub landed_state: MavLandedState,
13504}
13505impl EXTENDED_SYS_STATE_DATA {
13506 pub const ENCODED_LEN: usize = 2usize;
13507 pub const DEFAULT: Self = Self {
13508 vtol_state: MavVtolState::DEFAULT,
13509 landed_state: MavLandedState::DEFAULT,
13510 };
13511 #[cfg(feature = "arbitrary")]
13512 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13513 use arbitrary::{Arbitrary, Unstructured};
13514 let mut buf = [0u8; 1024];
13515 rng.fill_bytes(&mut buf);
13516 let mut unstructured = Unstructured::new(&buf);
13517 Self::arbitrary(&mut unstructured).unwrap_or_default()
13518 }
13519}
13520impl Default for EXTENDED_SYS_STATE_DATA {
13521 fn default() -> Self {
13522 Self::DEFAULT.clone()
13523 }
13524}
13525impl MessageData for EXTENDED_SYS_STATE_DATA {
13526 type Message = MavMessage;
13527 const ID: u32 = 245u32;
13528 const NAME: &'static str = "EXTENDED_SYS_STATE";
13529 const EXTRA_CRC: u8 = 130u8;
13530 const ENCODED_LEN: usize = 2usize;
13531 fn deser(
13532 _version: MavlinkVersion,
13533 __input: &[u8],
13534 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13535 let avail_len = __input.len();
13536 let mut payload_buf = [0; Self::ENCODED_LEN];
13537 let mut buf = if avail_len < Self::ENCODED_LEN {
13538 payload_buf[0..avail_len].copy_from_slice(__input);
13539 Bytes::new(&payload_buf)
13540 } else {
13541 Bytes::new(__input)
13542 };
13543 let mut __struct = Self::default();
13544 let tmp = buf.get_u8()?;
13545 __struct.vtol_state =
13546 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13547 enum_type: "MavVtolState",
13548 value: tmp as u64,
13549 })?;
13550 let tmp = buf.get_u8()?;
13551 __struct.landed_state =
13552 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13553 enum_type: "MavLandedState",
13554 value: tmp as u64,
13555 })?;
13556 Ok(__struct)
13557 }
13558 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13559 let mut __tmp = BytesMut::new(bytes);
13560 #[allow(clippy::absurd_extreme_comparisons)]
13561 #[allow(unused_comparisons)]
13562 if __tmp.remaining() < Self::ENCODED_LEN {
13563 panic!(
13564 "buffer is too small (need {} bytes, but got {})",
13565 Self::ENCODED_LEN,
13566 __tmp.remaining(),
13567 )
13568 }
13569 __tmp.put_u8(self.vtol_state as u8);
13570 __tmp.put_u8(self.landed_state as u8);
13571 if matches!(version, MavlinkVersion::V2) {
13572 let len = __tmp.len();
13573 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13574 } else {
13575 __tmp.len()
13576 }
13577 }
13578}
13579#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
13580#[doc = ""]
13581#[doc = "ID: 162"]
13582#[derive(Debug, Clone, PartialEq)]
13583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13585#[cfg_attr(feature = "ts", derive(TS))]
13586#[cfg_attr(feature = "ts", ts(export))]
13587pub struct FENCE_STATUS_DATA {
13588 #[doc = "Time (since boot) of last breach."]
13589 pub breach_time: u32,
13590 #[doc = "Number of fence breaches."]
13591 pub breach_count: u16,
13592 #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
13593 pub breach_status: u8,
13594 #[doc = "Last breach type."]
13595 pub breach_type: FenceBreach,
13596 #[doc = "Active action to prevent fence breach"]
13597 #[cfg_attr(feature = "serde", serde(default))]
13598 pub breach_mitigation: FenceMitigate,
13599}
13600impl FENCE_STATUS_DATA {
13601 pub const ENCODED_LEN: usize = 9usize;
13602 pub const DEFAULT: Self = Self {
13603 breach_time: 0_u32,
13604 breach_count: 0_u16,
13605 breach_status: 0_u8,
13606 breach_type: FenceBreach::DEFAULT,
13607 breach_mitigation: FenceMitigate::DEFAULT,
13608 };
13609 #[cfg(feature = "arbitrary")]
13610 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13611 use arbitrary::{Arbitrary, Unstructured};
13612 let mut buf = [0u8; 1024];
13613 rng.fill_bytes(&mut buf);
13614 let mut unstructured = Unstructured::new(&buf);
13615 Self::arbitrary(&mut unstructured).unwrap_or_default()
13616 }
13617}
13618impl Default for FENCE_STATUS_DATA {
13619 fn default() -> Self {
13620 Self::DEFAULT.clone()
13621 }
13622}
13623impl MessageData for FENCE_STATUS_DATA {
13624 type Message = MavMessage;
13625 const ID: u32 = 162u32;
13626 const NAME: &'static str = "FENCE_STATUS";
13627 const EXTRA_CRC: u8 = 189u8;
13628 const ENCODED_LEN: usize = 9usize;
13629 fn deser(
13630 _version: MavlinkVersion,
13631 __input: &[u8],
13632 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13633 let avail_len = __input.len();
13634 let mut payload_buf = [0; Self::ENCODED_LEN];
13635 let mut buf = if avail_len < Self::ENCODED_LEN {
13636 payload_buf[0..avail_len].copy_from_slice(__input);
13637 Bytes::new(&payload_buf)
13638 } else {
13639 Bytes::new(__input)
13640 };
13641 let mut __struct = Self::default();
13642 __struct.breach_time = buf.get_u32_le()?;
13643 __struct.breach_count = buf.get_u16_le()?;
13644 __struct.breach_status = buf.get_u8()?;
13645 let tmp = buf.get_u8()?;
13646 __struct.breach_type =
13647 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13648 enum_type: "FenceBreach",
13649 value: tmp as u64,
13650 })?;
13651 let tmp = buf.get_u8()?;
13652 __struct.breach_mitigation =
13653 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13654 enum_type: "FenceMitigate",
13655 value: tmp as u64,
13656 })?;
13657 Ok(__struct)
13658 }
13659 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13660 let mut __tmp = BytesMut::new(bytes);
13661 #[allow(clippy::absurd_extreme_comparisons)]
13662 #[allow(unused_comparisons)]
13663 if __tmp.remaining() < Self::ENCODED_LEN {
13664 panic!(
13665 "buffer is too small (need {} bytes, but got {})",
13666 Self::ENCODED_LEN,
13667 __tmp.remaining(),
13668 )
13669 }
13670 __tmp.put_u32_le(self.breach_time);
13671 __tmp.put_u16_le(self.breach_count);
13672 __tmp.put_u8(self.breach_status);
13673 __tmp.put_u8(self.breach_type as u8);
13674 if matches!(version, MavlinkVersion::V2) {
13675 __tmp.put_u8(self.breach_mitigation as u8);
13676 let len = __tmp.len();
13677 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13678 } else {
13679 __tmp.len()
13680 }
13681 }
13682}
13683#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
13684#[doc = ""]
13685#[doc = "ID: 110"]
13686#[derive(Debug, Clone, PartialEq)]
13687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13689#[cfg_attr(feature = "ts", derive(TS))]
13690#[cfg_attr(feature = "ts", ts(export))]
13691pub struct FILE_TRANSFER_PROTOCOL_DATA {
13692 #[doc = "Network ID (0 for broadcast)"]
13693 pub target_network: u8,
13694 #[doc = "System ID (0 for broadcast)"]
13695 pub target_system: u8,
13696 #[doc = "Component ID (0 for broadcast)"]
13697 pub target_component: u8,
13698 #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
13699 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13700 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13701 pub payload: [u8; 251],
13702}
13703impl FILE_TRANSFER_PROTOCOL_DATA {
13704 pub const ENCODED_LEN: usize = 254usize;
13705 pub const DEFAULT: Self = Self {
13706 target_network: 0_u8,
13707 target_system: 0_u8,
13708 target_component: 0_u8,
13709 payload: [0_u8; 251usize],
13710 };
13711 #[cfg(feature = "arbitrary")]
13712 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13713 use arbitrary::{Arbitrary, Unstructured};
13714 let mut buf = [0u8; 1024];
13715 rng.fill_bytes(&mut buf);
13716 let mut unstructured = Unstructured::new(&buf);
13717 Self::arbitrary(&mut unstructured).unwrap_or_default()
13718 }
13719}
13720impl Default for FILE_TRANSFER_PROTOCOL_DATA {
13721 fn default() -> Self {
13722 Self::DEFAULT.clone()
13723 }
13724}
13725impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
13726 type Message = MavMessage;
13727 const ID: u32 = 110u32;
13728 const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
13729 const EXTRA_CRC: u8 = 84u8;
13730 const ENCODED_LEN: usize = 254usize;
13731 fn deser(
13732 _version: MavlinkVersion,
13733 __input: &[u8],
13734 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13735 let avail_len = __input.len();
13736 let mut payload_buf = [0; Self::ENCODED_LEN];
13737 let mut buf = if avail_len < Self::ENCODED_LEN {
13738 payload_buf[0..avail_len].copy_from_slice(__input);
13739 Bytes::new(&payload_buf)
13740 } else {
13741 Bytes::new(__input)
13742 };
13743 let mut __struct = Self::default();
13744 __struct.target_network = buf.get_u8()?;
13745 __struct.target_system = buf.get_u8()?;
13746 __struct.target_component = buf.get_u8()?;
13747 for v in &mut __struct.payload {
13748 let val = buf.get_u8()?;
13749 *v = val;
13750 }
13751 Ok(__struct)
13752 }
13753 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13754 let mut __tmp = BytesMut::new(bytes);
13755 #[allow(clippy::absurd_extreme_comparisons)]
13756 #[allow(unused_comparisons)]
13757 if __tmp.remaining() < Self::ENCODED_LEN {
13758 panic!(
13759 "buffer is too small (need {} bytes, but got {})",
13760 Self::ENCODED_LEN,
13761 __tmp.remaining(),
13762 )
13763 }
13764 __tmp.put_u8(self.target_network);
13765 __tmp.put_u8(self.target_system);
13766 __tmp.put_u8(self.target_component);
13767 for val in &self.payload {
13768 __tmp.put_u8(*val);
13769 }
13770 if matches!(version, MavlinkVersion::V2) {
13771 let len = __tmp.len();
13772 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13773 } else {
13774 __tmp.len()
13775 }
13776 }
13777}
13778#[doc = "Flight information. This includes time since boot for arm, takeoff, and land, and a flight number. Takeoff and landing values reset to zero on arm. This can be requested using MAV_CMD_REQUEST_MESSAGE. Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
13779#[doc = ""]
13780#[doc = "ID: 264"]
13781#[derive(Debug, Clone, PartialEq)]
13782#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13784#[cfg_attr(feature = "ts", derive(TS))]
13785#[cfg_attr(feature = "ts", ts(export))]
13786pub struct FLIGHT_INFORMATION_DATA {
13787 #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
13788 pub arming_time_utc: u64,
13789 #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
13790 pub takeoff_time_utc: u64,
13791 #[doc = "Flight number. Note, field is misnamed UUID."]
13792 pub flight_uuid: u64,
13793 #[doc = "Timestamp (time since system boot)."]
13794 pub time_boot_ms: u32,
13795 #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
13796 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13797 pub landing_time: u32,
13798}
13799impl FLIGHT_INFORMATION_DATA {
13800 pub const ENCODED_LEN: usize = 32usize;
13801 pub const DEFAULT: Self = Self {
13802 arming_time_utc: 0_u64,
13803 takeoff_time_utc: 0_u64,
13804 flight_uuid: 0_u64,
13805 time_boot_ms: 0_u32,
13806 landing_time: 0_u32,
13807 };
13808 #[cfg(feature = "arbitrary")]
13809 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13810 use arbitrary::{Arbitrary, Unstructured};
13811 let mut buf = [0u8; 1024];
13812 rng.fill_bytes(&mut buf);
13813 let mut unstructured = Unstructured::new(&buf);
13814 Self::arbitrary(&mut unstructured).unwrap_or_default()
13815 }
13816}
13817impl Default for FLIGHT_INFORMATION_DATA {
13818 fn default() -> Self {
13819 Self::DEFAULT.clone()
13820 }
13821}
13822impl MessageData for FLIGHT_INFORMATION_DATA {
13823 type Message = MavMessage;
13824 const ID: u32 = 264u32;
13825 const NAME: &'static str = "FLIGHT_INFORMATION";
13826 const EXTRA_CRC: u8 = 49u8;
13827 const ENCODED_LEN: usize = 32usize;
13828 fn deser(
13829 _version: MavlinkVersion,
13830 __input: &[u8],
13831 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13832 let avail_len = __input.len();
13833 let mut payload_buf = [0; Self::ENCODED_LEN];
13834 let mut buf = if avail_len < Self::ENCODED_LEN {
13835 payload_buf[0..avail_len].copy_from_slice(__input);
13836 Bytes::new(&payload_buf)
13837 } else {
13838 Bytes::new(__input)
13839 };
13840 let mut __struct = Self::default();
13841 __struct.arming_time_utc = buf.get_u64_le()?;
13842 __struct.takeoff_time_utc = buf.get_u64_le()?;
13843 __struct.flight_uuid = buf.get_u64_le()?;
13844 __struct.time_boot_ms = buf.get_u32_le()?;
13845 __struct.landing_time = buf.get_u32_le()?;
13846 Ok(__struct)
13847 }
13848 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13849 let mut __tmp = BytesMut::new(bytes);
13850 #[allow(clippy::absurd_extreme_comparisons)]
13851 #[allow(unused_comparisons)]
13852 if __tmp.remaining() < Self::ENCODED_LEN {
13853 panic!(
13854 "buffer is too small (need {} bytes, but got {})",
13855 Self::ENCODED_LEN,
13856 __tmp.remaining(),
13857 )
13858 }
13859 __tmp.put_u64_le(self.arming_time_utc);
13860 __tmp.put_u64_le(self.takeoff_time_utc);
13861 __tmp.put_u64_le(self.flight_uuid);
13862 __tmp.put_u32_le(self.time_boot_ms);
13863 if matches!(version, MavlinkVersion::V2) {
13864 __tmp.put_u32_le(self.landing_time);
13865 let len = __tmp.len();
13866 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13867 } else {
13868 __tmp.len()
13869 }
13870 }
13871}
13872#[doc = "Current motion information from a designated system."]
13873#[doc = ""]
13874#[doc = "ID: 144"]
13875#[derive(Debug, Clone, PartialEq)]
13876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13878#[cfg_attr(feature = "ts", derive(TS))]
13879#[cfg_attr(feature = "ts", ts(export))]
13880pub struct FOLLOW_TARGET_DATA {
13881 #[doc = "Timestamp (time since system boot)."]
13882 pub timestamp: u64,
13883 #[doc = "button states or switches of a tracker device"]
13884 pub custom_state: u64,
13885 #[doc = "Latitude (WGS84)"]
13886 pub lat: i32,
13887 #[doc = "Longitude (WGS84)"]
13888 pub lon: i32,
13889 #[doc = "Altitude (MSL)"]
13890 pub alt: f32,
13891 #[doc = "target velocity (0,0,0) for unknown"]
13892 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13893 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13894 pub vel: [f32; 3],
13895 #[doc = "linear target acceleration (0,0,0) for unknown"]
13896 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13897 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13898 pub acc: [f32; 3],
13899 #[doc = "(0 0 0 0 for unknown)"]
13900 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13901 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13902 pub attitude_q: [f32; 4],
13903 #[doc = "(0 0 0 for unknown)"]
13904 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13905 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13906 pub rates: [f32; 3],
13907 #[doc = "eph epv"]
13908 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13909 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13910 pub position_cov: [f32; 3],
13911 #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
13912 pub est_capabilities: u8,
13913}
13914impl FOLLOW_TARGET_DATA {
13915 pub const ENCODED_LEN: usize = 93usize;
13916 pub const DEFAULT: Self = Self {
13917 timestamp: 0_u64,
13918 custom_state: 0_u64,
13919 lat: 0_i32,
13920 lon: 0_i32,
13921 alt: 0.0_f32,
13922 vel: [0.0_f32; 3usize],
13923 acc: [0.0_f32; 3usize],
13924 attitude_q: [0.0_f32; 4usize],
13925 rates: [0.0_f32; 3usize],
13926 position_cov: [0.0_f32; 3usize],
13927 est_capabilities: 0_u8,
13928 };
13929 #[cfg(feature = "arbitrary")]
13930 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13931 use arbitrary::{Arbitrary, Unstructured};
13932 let mut buf = [0u8; 1024];
13933 rng.fill_bytes(&mut buf);
13934 let mut unstructured = Unstructured::new(&buf);
13935 Self::arbitrary(&mut unstructured).unwrap_or_default()
13936 }
13937}
13938impl Default for FOLLOW_TARGET_DATA {
13939 fn default() -> Self {
13940 Self::DEFAULT.clone()
13941 }
13942}
13943impl MessageData for FOLLOW_TARGET_DATA {
13944 type Message = MavMessage;
13945 const ID: u32 = 144u32;
13946 const NAME: &'static str = "FOLLOW_TARGET";
13947 const EXTRA_CRC: u8 = 127u8;
13948 const ENCODED_LEN: usize = 93usize;
13949 fn deser(
13950 _version: MavlinkVersion,
13951 __input: &[u8],
13952 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13953 let avail_len = __input.len();
13954 let mut payload_buf = [0; Self::ENCODED_LEN];
13955 let mut buf = if avail_len < Self::ENCODED_LEN {
13956 payload_buf[0..avail_len].copy_from_slice(__input);
13957 Bytes::new(&payload_buf)
13958 } else {
13959 Bytes::new(__input)
13960 };
13961 let mut __struct = Self::default();
13962 __struct.timestamp = buf.get_u64_le()?;
13963 __struct.custom_state = buf.get_u64_le()?;
13964 __struct.lat = buf.get_i32_le()?;
13965 __struct.lon = buf.get_i32_le()?;
13966 __struct.alt = buf.get_f32_le()?;
13967 for v in &mut __struct.vel {
13968 let val = buf.get_f32_le()?;
13969 *v = val;
13970 }
13971 for v in &mut __struct.acc {
13972 let val = buf.get_f32_le()?;
13973 *v = val;
13974 }
13975 for v in &mut __struct.attitude_q {
13976 let val = buf.get_f32_le()?;
13977 *v = val;
13978 }
13979 for v in &mut __struct.rates {
13980 let val = buf.get_f32_le()?;
13981 *v = val;
13982 }
13983 for v in &mut __struct.position_cov {
13984 let val = buf.get_f32_le()?;
13985 *v = val;
13986 }
13987 __struct.est_capabilities = buf.get_u8()?;
13988 Ok(__struct)
13989 }
13990 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13991 let mut __tmp = BytesMut::new(bytes);
13992 #[allow(clippy::absurd_extreme_comparisons)]
13993 #[allow(unused_comparisons)]
13994 if __tmp.remaining() < Self::ENCODED_LEN {
13995 panic!(
13996 "buffer is too small (need {} bytes, but got {})",
13997 Self::ENCODED_LEN,
13998 __tmp.remaining(),
13999 )
14000 }
14001 __tmp.put_u64_le(self.timestamp);
14002 __tmp.put_u64_le(self.custom_state);
14003 __tmp.put_i32_le(self.lat);
14004 __tmp.put_i32_le(self.lon);
14005 __tmp.put_f32_le(self.alt);
14006 for val in &self.vel {
14007 __tmp.put_f32_le(*val);
14008 }
14009 for val in &self.acc {
14010 __tmp.put_f32_le(*val);
14011 }
14012 for val in &self.attitude_q {
14013 __tmp.put_f32_le(*val);
14014 }
14015 for val in &self.rates {
14016 __tmp.put_f32_le(*val);
14017 }
14018 for val in &self.position_cov {
14019 __tmp.put_f32_le(*val);
14020 }
14021 __tmp.put_u8(self.est_capabilities);
14022 if matches!(version, MavlinkVersion::V2) {
14023 let len = __tmp.len();
14024 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14025 } else {
14026 __tmp.len()
14027 }
14028 }
14029}
14030#[doc = "Fuel status. This message provides \"generic\" fuel level information for in a GCS and for triggering failsafes in an autopilot. The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE. The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value. A recipient can assume that if these fields are supplied they are accurate. If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume). Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot). This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2. If both messages are sent for the same fuel system, the ids and corresponding information must match. This should be streamed (nominally at 0.1 Hz)."]
14031#[doc = ""]
14032#[doc = "ID: 371"]
14033#[derive(Debug, Clone, PartialEq)]
14034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14036#[cfg_attr(feature = "ts", derive(TS))]
14037#[cfg_attr(feature = "ts", ts(export))]
14038pub struct FUEL_STATUS_DATA {
14039 #[doc = "Capacity when full. Must be provided."]
14040 pub maximum_fuel: f32,
14041 #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
14042 pub consumed_fuel: f32,
14043 #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
14044 pub remaining_fuel: f32,
14045 #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
14046 pub flow_rate: f32,
14047 #[doc = "Fuel temperature. NaN: field not provided."]
14048 pub temperature: f32,
14049 #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
14050 pub fuel_type: MavFuelType,
14051 #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
14052 pub id: u8,
14053 #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
14054 pub percent_remaining: u8,
14055}
14056impl FUEL_STATUS_DATA {
14057 pub const ENCODED_LEN: usize = 26usize;
14058 pub const DEFAULT: Self = Self {
14059 maximum_fuel: 0.0_f32,
14060 consumed_fuel: 0.0_f32,
14061 remaining_fuel: 0.0_f32,
14062 flow_rate: 0.0_f32,
14063 temperature: 0.0_f32,
14064 fuel_type: MavFuelType::DEFAULT,
14065 id: 0_u8,
14066 percent_remaining: 0_u8,
14067 };
14068 #[cfg(feature = "arbitrary")]
14069 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14070 use arbitrary::{Arbitrary, Unstructured};
14071 let mut buf = [0u8; 1024];
14072 rng.fill_bytes(&mut buf);
14073 let mut unstructured = Unstructured::new(&buf);
14074 Self::arbitrary(&mut unstructured).unwrap_or_default()
14075 }
14076}
14077impl Default for FUEL_STATUS_DATA {
14078 fn default() -> Self {
14079 Self::DEFAULT.clone()
14080 }
14081}
14082impl MessageData for FUEL_STATUS_DATA {
14083 type Message = MavMessage;
14084 const ID: u32 = 371u32;
14085 const NAME: &'static str = "FUEL_STATUS";
14086 const EXTRA_CRC: u8 = 10u8;
14087 const ENCODED_LEN: usize = 26usize;
14088 fn deser(
14089 _version: MavlinkVersion,
14090 __input: &[u8],
14091 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14092 let avail_len = __input.len();
14093 let mut payload_buf = [0; Self::ENCODED_LEN];
14094 let mut buf = if avail_len < Self::ENCODED_LEN {
14095 payload_buf[0..avail_len].copy_from_slice(__input);
14096 Bytes::new(&payload_buf)
14097 } else {
14098 Bytes::new(__input)
14099 };
14100 let mut __struct = Self::default();
14101 __struct.maximum_fuel = buf.get_f32_le()?;
14102 __struct.consumed_fuel = buf.get_f32_le()?;
14103 __struct.remaining_fuel = buf.get_f32_le()?;
14104 __struct.flow_rate = buf.get_f32_le()?;
14105 __struct.temperature = buf.get_f32_le()?;
14106 let tmp = buf.get_u32_le()?;
14107 __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
14108 ::mavlink_core::error::ParserError::InvalidEnum {
14109 enum_type: "MavFuelType",
14110 value: tmp as u64,
14111 },
14112 )?;
14113 __struct.id = buf.get_u8()?;
14114 __struct.percent_remaining = buf.get_u8()?;
14115 Ok(__struct)
14116 }
14117 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14118 let mut __tmp = BytesMut::new(bytes);
14119 #[allow(clippy::absurd_extreme_comparisons)]
14120 #[allow(unused_comparisons)]
14121 if __tmp.remaining() < Self::ENCODED_LEN {
14122 panic!(
14123 "buffer is too small (need {} bytes, but got {})",
14124 Self::ENCODED_LEN,
14125 __tmp.remaining(),
14126 )
14127 }
14128 __tmp.put_f32_le(self.maximum_fuel);
14129 __tmp.put_f32_le(self.consumed_fuel);
14130 __tmp.put_f32_le(self.remaining_fuel);
14131 __tmp.put_f32_le(self.flow_rate);
14132 __tmp.put_f32_le(self.temperature);
14133 __tmp.put_u32_le(self.fuel_type as u32);
14134 __tmp.put_u8(self.id);
14135 __tmp.put_u8(self.percent_remaining);
14136 if matches!(version, MavlinkVersion::V2) {
14137 let len = __tmp.len();
14138 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14139 } else {
14140 __tmp.len()
14141 }
14142 }
14143}
14144#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
14145#[doc = ""]
14146#[doc = "ID: 373"]
14147#[derive(Debug, Clone, PartialEq)]
14148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14150#[cfg_attr(feature = "ts", derive(TS))]
14151#[cfg_attr(feature = "ts", ts(export))]
14152pub struct GENERATOR_STATUS_DATA {
14153 #[doc = "Status flags."]
14154 pub status: MavGeneratorStatusFlag,
14155 #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
14156 pub battery_current: f32,
14157 #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
14158 pub load_current: f32,
14159 #[doc = "The power being generated. NaN: field not provided"]
14160 pub power_generated: f32,
14161 #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
14162 pub bus_voltage: f32,
14163 #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
14164 pub bat_current_setpoint: f32,
14165 #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
14166 pub runtime: u32,
14167 #[doc = "Seconds until this generator requires maintenance. A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
14168 pub time_until_maintenance: i32,
14169 #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
14170 pub generator_speed: u16,
14171 #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
14172 pub rectifier_temperature: i16,
14173 #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
14174 pub generator_temperature: i16,
14175}
14176impl GENERATOR_STATUS_DATA {
14177 pub const ENCODED_LEN: usize = 42usize;
14178 pub const DEFAULT: Self = Self {
14179 status: MavGeneratorStatusFlag::DEFAULT,
14180 battery_current: 0.0_f32,
14181 load_current: 0.0_f32,
14182 power_generated: 0.0_f32,
14183 bus_voltage: 0.0_f32,
14184 bat_current_setpoint: 0.0_f32,
14185 runtime: 0_u32,
14186 time_until_maintenance: 0_i32,
14187 generator_speed: 0_u16,
14188 rectifier_temperature: 0_i16,
14189 generator_temperature: 0_i16,
14190 };
14191 #[cfg(feature = "arbitrary")]
14192 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14193 use arbitrary::{Arbitrary, Unstructured};
14194 let mut buf = [0u8; 1024];
14195 rng.fill_bytes(&mut buf);
14196 let mut unstructured = Unstructured::new(&buf);
14197 Self::arbitrary(&mut unstructured).unwrap_or_default()
14198 }
14199}
14200impl Default for GENERATOR_STATUS_DATA {
14201 fn default() -> Self {
14202 Self::DEFAULT.clone()
14203 }
14204}
14205impl MessageData for GENERATOR_STATUS_DATA {
14206 type Message = MavMessage;
14207 const ID: u32 = 373u32;
14208 const NAME: &'static str = "GENERATOR_STATUS";
14209 const EXTRA_CRC: u8 = 117u8;
14210 const ENCODED_LEN: usize = 42usize;
14211 fn deser(
14212 _version: MavlinkVersion,
14213 __input: &[u8],
14214 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14215 let avail_len = __input.len();
14216 let mut payload_buf = [0; Self::ENCODED_LEN];
14217 let mut buf = if avail_len < Self::ENCODED_LEN {
14218 payload_buf[0..avail_len].copy_from_slice(__input);
14219 Bytes::new(&payload_buf)
14220 } else {
14221 Bytes::new(__input)
14222 };
14223 let mut __struct = Self::default();
14224 let tmp = buf.get_u64_le()?;
14225 __struct.status =
14226 MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
14227 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14228 flag_type: "MavGeneratorStatusFlag",
14229 value: tmp as u64,
14230 })?;
14231 __struct.battery_current = buf.get_f32_le()?;
14232 __struct.load_current = buf.get_f32_le()?;
14233 __struct.power_generated = buf.get_f32_le()?;
14234 __struct.bus_voltage = buf.get_f32_le()?;
14235 __struct.bat_current_setpoint = buf.get_f32_le()?;
14236 __struct.runtime = buf.get_u32_le()?;
14237 __struct.time_until_maintenance = buf.get_i32_le()?;
14238 __struct.generator_speed = buf.get_u16_le()?;
14239 __struct.rectifier_temperature = buf.get_i16_le()?;
14240 __struct.generator_temperature = buf.get_i16_le()?;
14241 Ok(__struct)
14242 }
14243 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14244 let mut __tmp = BytesMut::new(bytes);
14245 #[allow(clippy::absurd_extreme_comparisons)]
14246 #[allow(unused_comparisons)]
14247 if __tmp.remaining() < Self::ENCODED_LEN {
14248 panic!(
14249 "buffer is too small (need {} bytes, but got {})",
14250 Self::ENCODED_LEN,
14251 __tmp.remaining(),
14252 )
14253 }
14254 __tmp.put_u64_le(self.status.bits() as u64);
14255 __tmp.put_f32_le(self.battery_current);
14256 __tmp.put_f32_le(self.load_current);
14257 __tmp.put_f32_le(self.power_generated);
14258 __tmp.put_f32_le(self.bus_voltage);
14259 __tmp.put_f32_le(self.bat_current_setpoint);
14260 __tmp.put_u32_le(self.runtime);
14261 __tmp.put_i32_le(self.time_until_maintenance);
14262 __tmp.put_u16_le(self.generator_speed);
14263 __tmp.put_i16_le(self.rectifier_temperature);
14264 __tmp.put_i16_le(self.generator_temperature);
14265 if matches!(version, MavlinkVersion::V2) {
14266 let len = __tmp.len();
14267 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14268 } else {
14269 __tmp.len()
14270 }
14271 }
14272}
14273#[doc = "Message reporting the status of a gimbal device. \t This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t For the angles encoded in the quaternion and the angular velocities holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t If neither of these flags are set, then (for backwards compatibility) it holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t else they are relative to the vehicle heading (vehicle frame). \t Other conditions of the flags are not allowed. \t The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
14274#[doc = ""]
14275#[doc = "ID: 285"]
14276#[derive(Debug, Clone, PartialEq)]
14277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14279#[cfg_attr(feature = "ts", derive(TS))]
14280#[cfg_attr(feature = "ts", ts(export))]
14281pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14282 #[doc = "Timestamp (time since system boot)."]
14283 pub time_boot_ms: u32,
14284 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
14285 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14286 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14287 pub q: [f32; 4],
14288 #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
14289 pub angular_velocity_x: f32,
14290 #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
14291 pub angular_velocity_y: f32,
14292 #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
14293 pub angular_velocity_z: f32,
14294 #[doc = "Failure flags (0 for no failure)"]
14295 pub failure_flags: GimbalDeviceErrorFlags,
14296 #[doc = "Current gimbal flags set."]
14297 pub flags: GimbalDeviceFlags,
14298 #[doc = "System ID"]
14299 pub target_system: u8,
14300 #[doc = "Component ID"]
14301 pub target_component: u8,
14302 #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
14303 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14304 pub delta_yaw: f32,
14305 #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
14306 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14307 pub delta_yaw_velocity: f32,
14308 #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
14309 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14310 pub gimbal_device_id: u8,
14311}
14312impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14313 pub const ENCODED_LEN: usize = 49usize;
14314 pub const DEFAULT: Self = Self {
14315 time_boot_ms: 0_u32,
14316 q: [0.0_f32; 4usize],
14317 angular_velocity_x: 0.0_f32,
14318 angular_velocity_y: 0.0_f32,
14319 angular_velocity_z: 0.0_f32,
14320 failure_flags: GimbalDeviceErrorFlags::DEFAULT,
14321 flags: GimbalDeviceFlags::DEFAULT,
14322 target_system: 0_u8,
14323 target_component: 0_u8,
14324 delta_yaw: 0.0_f32,
14325 delta_yaw_velocity: 0.0_f32,
14326 gimbal_device_id: 0_u8,
14327 };
14328 #[cfg(feature = "arbitrary")]
14329 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14330 use arbitrary::{Arbitrary, Unstructured};
14331 let mut buf = [0u8; 1024];
14332 rng.fill_bytes(&mut buf);
14333 let mut unstructured = Unstructured::new(&buf);
14334 Self::arbitrary(&mut unstructured).unwrap_or_default()
14335 }
14336}
14337impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14338 fn default() -> Self {
14339 Self::DEFAULT.clone()
14340 }
14341}
14342impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14343 type Message = MavMessage;
14344 const ID: u32 = 285u32;
14345 const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
14346 const EXTRA_CRC: u8 = 137u8;
14347 const ENCODED_LEN: usize = 49usize;
14348 fn deser(
14349 _version: MavlinkVersion,
14350 __input: &[u8],
14351 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14352 let avail_len = __input.len();
14353 let mut payload_buf = [0; Self::ENCODED_LEN];
14354 let mut buf = if avail_len < Self::ENCODED_LEN {
14355 payload_buf[0..avail_len].copy_from_slice(__input);
14356 Bytes::new(&payload_buf)
14357 } else {
14358 Bytes::new(__input)
14359 };
14360 let mut __struct = Self::default();
14361 __struct.time_boot_ms = buf.get_u32_le()?;
14362 for v in &mut __struct.q {
14363 let val = buf.get_f32_le()?;
14364 *v = val;
14365 }
14366 __struct.angular_velocity_x = buf.get_f32_le()?;
14367 __struct.angular_velocity_y = buf.get_f32_le()?;
14368 __struct.angular_velocity_z = buf.get_f32_le()?;
14369 let tmp = buf.get_u32_le()?;
14370 __struct.failure_flags =
14371 GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
14372 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14373 flag_type: "GimbalDeviceErrorFlags",
14374 value: tmp as u64,
14375 })?;
14376 let tmp = buf.get_u16_le()?;
14377 __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
14378 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14379 flag_type: "GimbalDeviceFlags",
14380 value: tmp as u64,
14381 })?;
14382 __struct.target_system = buf.get_u8()?;
14383 __struct.target_component = buf.get_u8()?;
14384 __struct.delta_yaw = buf.get_f32_le()?;
14385 __struct.delta_yaw_velocity = buf.get_f32_le()?;
14386 __struct.gimbal_device_id = buf.get_u8()?;
14387 Ok(__struct)
14388 }
14389 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14390 let mut __tmp = BytesMut::new(bytes);
14391 #[allow(clippy::absurd_extreme_comparisons)]
14392 #[allow(unused_comparisons)]
14393 if __tmp.remaining() < Self::ENCODED_LEN {
14394 panic!(
14395 "buffer is too small (need {} bytes, but got {})",
14396 Self::ENCODED_LEN,
14397 __tmp.remaining(),
14398 )
14399 }
14400 __tmp.put_u32_le(self.time_boot_ms);
14401 for val in &self.q {
14402 __tmp.put_f32_le(*val);
14403 }
14404 __tmp.put_f32_le(self.angular_velocity_x);
14405 __tmp.put_f32_le(self.angular_velocity_y);
14406 __tmp.put_f32_le(self.angular_velocity_z);
14407 __tmp.put_u32_le(self.failure_flags.bits() as u32);
14408 __tmp.put_u16_le(self.flags.bits() as u16);
14409 __tmp.put_u8(self.target_system);
14410 __tmp.put_u8(self.target_component);
14411 if matches!(version, MavlinkVersion::V2) {
14412 __tmp.put_f32_le(self.delta_yaw);
14413 __tmp.put_f32_le(self.delta_yaw_velocity);
14414 __tmp.put_u8(self.gimbal_device_id);
14415 let len = __tmp.len();
14416 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14417 } else {
14418 __tmp.len()
14419 }
14420 }
14421}
14422#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
14423#[doc = ""]
14424#[doc = "ID: 283"]
14425#[derive(Debug, Clone, PartialEq)]
14426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14428#[cfg_attr(feature = "ts", derive(TS))]
14429#[cfg_attr(feature = "ts", ts(export))]
14430pub struct GIMBAL_DEVICE_INFORMATION_DATA {
14431 #[doc = "UID of gimbal hardware (0 if unknown)."]
14432 pub uid: u64,
14433 #[doc = "Timestamp (time since system boot)."]
14434 pub time_boot_ms: u32,
14435 #[doc = "Version of the gimbal firmware, encoded as: (Dev&0xff)<<24 | (Patch&0xff)<<16 | (Minor&0xff)<<8 | (Major&0xff)."]
14436 pub firmware_version: u32,
14437 #[doc = "Version of the gimbal hardware, encoded as: (Dev&0xff)<<24 | (Patch&0xff)<<16 | (Minor&0xff)<<8 | (Major&0xff)."]
14438 pub hardware_version: u32,
14439 #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
14440 pub roll_min: f32,
14441 #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
14442 pub roll_max: f32,
14443 #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
14444 pub pitch_min: f32,
14445 #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
14446 pub pitch_max: f32,
14447 #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
14448 pub yaw_min: f32,
14449 #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
14450 pub yaw_max: f32,
14451 #[doc = "Bitmap of gimbal capability flags."]
14452 pub cap_flags: GimbalDeviceCapFlags,
14453 #[doc = "Bitmap for use for gimbal-specific capability flags."]
14454 pub custom_cap_flags: u16,
14455 #[doc = "Name of the gimbal vendor."]
14456 #[cfg_attr(feature = "ts", ts(type = "string"))]
14457 pub vendor_name: CharArray<32>,
14458 #[doc = "Name of the gimbal model."]
14459 #[cfg_attr(feature = "ts", ts(type = "string"))]
14460 pub model_name: CharArray<32>,
14461 #[doc = "Custom name of the gimbal given to it by the user."]
14462 #[cfg_attr(feature = "ts", ts(type = "string"))]
14463 pub custom_name: CharArray<32>,
14464 #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
14465 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14466 pub gimbal_device_id: u8,
14467}
14468impl GIMBAL_DEVICE_INFORMATION_DATA {
14469 pub const ENCODED_LEN: usize = 145usize;
14470 pub const DEFAULT: Self = Self {
14471 uid: 0_u64,
14472 time_boot_ms: 0_u32,
14473 firmware_version: 0_u32,
14474 hardware_version: 0_u32,
14475 roll_min: 0.0_f32,
14476 roll_max: 0.0_f32,
14477 pitch_min: 0.0_f32,
14478 pitch_max: 0.0_f32,
14479 yaw_min: 0.0_f32,
14480 yaw_max: 0.0_f32,
14481 cap_flags: GimbalDeviceCapFlags::DEFAULT,
14482 custom_cap_flags: 0_u16,
14483 vendor_name: CharArray::new([0_u8; 32usize]),
14484 model_name: CharArray::new([0_u8; 32usize]),
14485 custom_name: CharArray::new([0_u8; 32usize]),
14486 gimbal_device_id: 0_u8,
14487 };
14488 #[cfg(feature = "arbitrary")]
14489 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14490 use arbitrary::{Arbitrary, Unstructured};
14491 let mut buf = [0u8; 1024];
14492 rng.fill_bytes(&mut buf);
14493 let mut unstructured = Unstructured::new(&buf);
14494 Self::arbitrary(&mut unstructured).unwrap_or_default()
14495 }
14496}
14497impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
14498 fn default() -> Self {
14499 Self::DEFAULT.clone()
14500 }
14501}
14502impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
14503 type Message = MavMessage;
14504 const ID: u32 = 283u32;
14505 const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
14506 const EXTRA_CRC: u8 = 74u8;
14507 const ENCODED_LEN: usize = 145usize;
14508 fn deser(
14509 _version: MavlinkVersion,
14510 __input: &[u8],
14511 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14512 let avail_len = __input.len();
14513 let mut payload_buf = [0; Self::ENCODED_LEN];
14514 let mut buf = if avail_len < Self::ENCODED_LEN {
14515 payload_buf[0..avail_len].copy_from_slice(__input);
14516 Bytes::new(&payload_buf)
14517 } else {
14518 Bytes::new(__input)
14519 };
14520 let mut __struct = Self::default();
14521 __struct.uid = buf.get_u64_le()?;
14522 __struct.time_boot_ms = buf.get_u32_le()?;
14523 __struct.firmware_version = buf.get_u32_le()?;
14524 __struct.hardware_version = buf.get_u32_le()?;
14525 __struct.roll_min = buf.get_f32_le()?;
14526 __struct.roll_max = buf.get_f32_le()?;
14527 __struct.pitch_min = buf.get_f32_le()?;
14528 __struct.pitch_max = buf.get_f32_le()?;
14529 __struct.yaw_min = buf.get_f32_le()?;
14530 __struct.yaw_max = buf.get_f32_le()?;
14531 let tmp = buf.get_u16_le()?;
14532 __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
14533 tmp as <GimbalDeviceCapFlags as Flags>::Bits,
14534 )
14535 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14536 flag_type: "GimbalDeviceCapFlags",
14537 value: tmp as u64,
14538 })?;
14539 __struct.custom_cap_flags = buf.get_u16_le()?;
14540 let mut tmp = [0_u8; 32usize];
14541 for v in &mut tmp {
14542 *v = buf.get_u8()?;
14543 }
14544 __struct.vendor_name = CharArray::new(tmp);
14545 let mut tmp = [0_u8; 32usize];
14546 for v in &mut tmp {
14547 *v = buf.get_u8()?;
14548 }
14549 __struct.model_name = CharArray::new(tmp);
14550 let mut tmp = [0_u8; 32usize];
14551 for v in &mut tmp {
14552 *v = buf.get_u8()?;
14553 }
14554 __struct.custom_name = CharArray::new(tmp);
14555 __struct.gimbal_device_id = buf.get_u8()?;
14556 Ok(__struct)
14557 }
14558 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14559 let mut __tmp = BytesMut::new(bytes);
14560 #[allow(clippy::absurd_extreme_comparisons)]
14561 #[allow(unused_comparisons)]
14562 if __tmp.remaining() < Self::ENCODED_LEN {
14563 panic!(
14564 "buffer is too small (need {} bytes, but got {})",
14565 Self::ENCODED_LEN,
14566 __tmp.remaining(),
14567 )
14568 }
14569 __tmp.put_u64_le(self.uid);
14570 __tmp.put_u32_le(self.time_boot_ms);
14571 __tmp.put_u32_le(self.firmware_version);
14572 __tmp.put_u32_le(self.hardware_version);
14573 __tmp.put_f32_le(self.roll_min);
14574 __tmp.put_f32_le(self.roll_max);
14575 __tmp.put_f32_le(self.pitch_min);
14576 __tmp.put_f32_le(self.pitch_max);
14577 __tmp.put_f32_le(self.yaw_min);
14578 __tmp.put_f32_le(self.yaw_max);
14579 __tmp.put_u16_le(self.cap_flags.bits() as u16);
14580 __tmp.put_u16_le(self.custom_cap_flags);
14581 for val in &self.vendor_name {
14582 __tmp.put_u8(*val);
14583 }
14584 for val in &self.model_name {
14585 __tmp.put_u8(*val);
14586 }
14587 for val in &self.custom_name {
14588 __tmp.put_u8(*val);
14589 }
14590 if matches!(version, MavlinkVersion::V2) {
14591 __tmp.put_u8(self.gimbal_device_id);
14592 let len = __tmp.len();
14593 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14594 } else {
14595 __tmp.len()
14596 }
14597 }
14598}
14599#[doc = "Low level message to control a gimbal device's attitude. \t This message is to be sent from the gimbal manager to the gimbal device component. \t The quaternion and angular velocities can be set to NaN according to use case. \t For the angles encoded in the quaternion and the angular velocities holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t If neither of these flags are set, then (for backwards compatibility) it holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t else they are relative to the vehicle heading (vehicle frame). \t Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t These rules are to ensure backwards compatibility. \t New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
14600#[doc = ""]
14601#[doc = "ID: 284"]
14602#[derive(Debug, Clone, PartialEq)]
14603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14605#[cfg_attr(feature = "ts", derive(TS))]
14606#[cfg_attr(feature = "ts", ts(export))]
14607pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
14608 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
14609 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14610 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14611 pub q: [f32; 4],
14612 #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
14613 pub angular_velocity_x: f32,
14614 #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
14615 pub angular_velocity_y: f32,
14616 #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
14617 pub angular_velocity_z: f32,
14618 #[doc = "Low level gimbal flags."]
14619 pub flags: GimbalDeviceFlags,
14620 #[doc = "System ID"]
14621 pub target_system: u8,
14622 #[doc = "Component ID"]
14623 pub target_component: u8,
14624}
14625impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
14626 pub const ENCODED_LEN: usize = 32usize;
14627 pub const DEFAULT: Self = Self {
14628 q: [0.0_f32; 4usize],
14629 angular_velocity_x: 0.0_f32,
14630 angular_velocity_y: 0.0_f32,
14631 angular_velocity_z: 0.0_f32,
14632 flags: GimbalDeviceFlags::DEFAULT,
14633 target_system: 0_u8,
14634 target_component: 0_u8,
14635 };
14636 #[cfg(feature = "arbitrary")]
14637 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14638 use arbitrary::{Arbitrary, Unstructured};
14639 let mut buf = [0u8; 1024];
14640 rng.fill_bytes(&mut buf);
14641 let mut unstructured = Unstructured::new(&buf);
14642 Self::arbitrary(&mut unstructured).unwrap_or_default()
14643 }
14644}
14645impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
14646 fn default() -> Self {
14647 Self::DEFAULT.clone()
14648 }
14649}
14650impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
14651 type Message = MavMessage;
14652 const ID: u32 = 284u32;
14653 const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
14654 const EXTRA_CRC: u8 = 99u8;
14655 const ENCODED_LEN: usize = 32usize;
14656 fn deser(
14657 _version: MavlinkVersion,
14658 __input: &[u8],
14659 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14660 let avail_len = __input.len();
14661 let mut payload_buf = [0; Self::ENCODED_LEN];
14662 let mut buf = if avail_len < Self::ENCODED_LEN {
14663 payload_buf[0..avail_len].copy_from_slice(__input);
14664 Bytes::new(&payload_buf)
14665 } else {
14666 Bytes::new(__input)
14667 };
14668 let mut __struct = Self::default();
14669 for v in &mut __struct.q {
14670 let val = buf.get_f32_le()?;
14671 *v = val;
14672 }
14673 __struct.angular_velocity_x = buf.get_f32_le()?;
14674 __struct.angular_velocity_y = buf.get_f32_le()?;
14675 __struct.angular_velocity_z = buf.get_f32_le()?;
14676 let tmp = buf.get_u16_le()?;
14677 __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
14678 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14679 flag_type: "GimbalDeviceFlags",
14680 value: tmp as u64,
14681 })?;
14682 __struct.target_system = buf.get_u8()?;
14683 __struct.target_component = buf.get_u8()?;
14684 Ok(__struct)
14685 }
14686 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14687 let mut __tmp = BytesMut::new(bytes);
14688 #[allow(clippy::absurd_extreme_comparisons)]
14689 #[allow(unused_comparisons)]
14690 if __tmp.remaining() < Self::ENCODED_LEN {
14691 panic!(
14692 "buffer is too small (need {} bytes, but got {})",
14693 Self::ENCODED_LEN,
14694 __tmp.remaining(),
14695 )
14696 }
14697 for val in &self.q {
14698 __tmp.put_f32_le(*val);
14699 }
14700 __tmp.put_f32_le(self.angular_velocity_x);
14701 __tmp.put_f32_le(self.angular_velocity_y);
14702 __tmp.put_f32_le(self.angular_velocity_z);
14703 __tmp.put_u16_le(self.flags.bits() as u16);
14704 __tmp.put_u8(self.target_system);
14705 __tmp.put_u8(self.target_component);
14706 if matches!(version, MavlinkVersion::V2) {
14707 let len = __tmp.len();
14708 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14709 } else {
14710 __tmp.len()
14711 }
14712 }
14713}
14714#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
14715#[doc = ""]
14716#[doc = "ID: 280"]
14717#[derive(Debug, Clone, PartialEq)]
14718#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14720#[cfg_attr(feature = "ts", derive(TS))]
14721#[cfg_attr(feature = "ts", ts(export))]
14722pub struct GIMBAL_MANAGER_INFORMATION_DATA {
14723 #[doc = "Timestamp (time since system boot)."]
14724 pub time_boot_ms: u32,
14725 #[doc = "Bitmap of gimbal capability flags."]
14726 pub cap_flags: GimbalManagerCapFlags,
14727 #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
14728 pub roll_min: f32,
14729 #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
14730 pub roll_max: f32,
14731 #[doc = "Minimum pitch angle (positive: up, negative: down)"]
14732 pub pitch_min: f32,
14733 #[doc = "Maximum pitch angle (positive: up, negative: down)"]
14734 pub pitch_max: f32,
14735 #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
14736 pub yaw_min: f32,
14737 #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
14738 pub yaw_max: f32,
14739 #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
14740 pub gimbal_device_id: u8,
14741}
14742impl GIMBAL_MANAGER_INFORMATION_DATA {
14743 pub const ENCODED_LEN: usize = 33usize;
14744 pub const DEFAULT: Self = Self {
14745 time_boot_ms: 0_u32,
14746 cap_flags: GimbalManagerCapFlags::DEFAULT,
14747 roll_min: 0.0_f32,
14748 roll_max: 0.0_f32,
14749 pitch_min: 0.0_f32,
14750 pitch_max: 0.0_f32,
14751 yaw_min: 0.0_f32,
14752 yaw_max: 0.0_f32,
14753 gimbal_device_id: 0_u8,
14754 };
14755 #[cfg(feature = "arbitrary")]
14756 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14757 use arbitrary::{Arbitrary, Unstructured};
14758 let mut buf = [0u8; 1024];
14759 rng.fill_bytes(&mut buf);
14760 let mut unstructured = Unstructured::new(&buf);
14761 Self::arbitrary(&mut unstructured).unwrap_or_default()
14762 }
14763}
14764impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
14765 fn default() -> Self {
14766 Self::DEFAULT.clone()
14767 }
14768}
14769impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
14770 type Message = MavMessage;
14771 const ID: u32 = 280u32;
14772 const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
14773 const EXTRA_CRC: u8 = 70u8;
14774 const ENCODED_LEN: usize = 33usize;
14775 fn deser(
14776 _version: MavlinkVersion,
14777 __input: &[u8],
14778 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14779 let avail_len = __input.len();
14780 let mut payload_buf = [0; Self::ENCODED_LEN];
14781 let mut buf = if avail_len < Self::ENCODED_LEN {
14782 payload_buf[0..avail_len].copy_from_slice(__input);
14783 Bytes::new(&payload_buf)
14784 } else {
14785 Bytes::new(__input)
14786 };
14787 let mut __struct = Self::default();
14788 __struct.time_boot_ms = buf.get_u32_le()?;
14789 let tmp = buf.get_u32_le()?;
14790 __struct.cap_flags = GimbalManagerCapFlags::from_bits(
14791 tmp as <GimbalManagerCapFlags as Flags>::Bits,
14792 )
14793 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14794 flag_type: "GimbalManagerCapFlags",
14795 value: tmp as u64,
14796 })?;
14797 __struct.roll_min = buf.get_f32_le()?;
14798 __struct.roll_max = buf.get_f32_le()?;
14799 __struct.pitch_min = buf.get_f32_le()?;
14800 __struct.pitch_max = buf.get_f32_le()?;
14801 __struct.yaw_min = buf.get_f32_le()?;
14802 __struct.yaw_max = buf.get_f32_le()?;
14803 __struct.gimbal_device_id = buf.get_u8()?;
14804 Ok(__struct)
14805 }
14806 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14807 let mut __tmp = BytesMut::new(bytes);
14808 #[allow(clippy::absurd_extreme_comparisons)]
14809 #[allow(unused_comparisons)]
14810 if __tmp.remaining() < Self::ENCODED_LEN {
14811 panic!(
14812 "buffer is too small (need {} bytes, but got {})",
14813 Self::ENCODED_LEN,
14814 __tmp.remaining(),
14815 )
14816 }
14817 __tmp.put_u32_le(self.time_boot_ms);
14818 __tmp.put_u32_le(self.cap_flags.bits() as u32);
14819 __tmp.put_f32_le(self.roll_min);
14820 __tmp.put_f32_le(self.roll_max);
14821 __tmp.put_f32_le(self.pitch_min);
14822 __tmp.put_f32_le(self.pitch_max);
14823 __tmp.put_f32_le(self.yaw_min);
14824 __tmp.put_f32_le(self.yaw_max);
14825 __tmp.put_u8(self.gimbal_device_id);
14826 if matches!(version, MavlinkVersion::V2) {
14827 let len = __tmp.len();
14828 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14829 } else {
14830 __tmp.len()
14831 }
14832 }
14833}
14834#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
14835#[doc = ""]
14836#[doc = "ID: 282"]
14837#[derive(Debug, Clone, PartialEq)]
14838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14840#[cfg_attr(feature = "ts", derive(TS))]
14841#[cfg_attr(feature = "ts", ts(export))]
14842pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
14843 #[doc = "High level gimbal manager flags to use."]
14844 pub flags: GimbalManagerFlags,
14845 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
14846 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14847 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14848 pub q: [f32; 4],
14849 #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
14850 pub angular_velocity_x: f32,
14851 #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
14852 pub angular_velocity_y: f32,
14853 #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
14854 pub angular_velocity_z: f32,
14855 #[doc = "System ID"]
14856 pub target_system: u8,
14857 #[doc = "Component ID"]
14858 pub target_component: u8,
14859 #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14860 pub gimbal_device_id: u8,
14861}
14862impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
14863 pub const ENCODED_LEN: usize = 35usize;
14864 pub const DEFAULT: Self = Self {
14865 flags: GimbalManagerFlags::DEFAULT,
14866 q: [0.0_f32; 4usize],
14867 angular_velocity_x: 0.0_f32,
14868 angular_velocity_y: 0.0_f32,
14869 angular_velocity_z: 0.0_f32,
14870 target_system: 0_u8,
14871 target_component: 0_u8,
14872 gimbal_device_id: 0_u8,
14873 };
14874 #[cfg(feature = "arbitrary")]
14875 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14876 use arbitrary::{Arbitrary, Unstructured};
14877 let mut buf = [0u8; 1024];
14878 rng.fill_bytes(&mut buf);
14879 let mut unstructured = Unstructured::new(&buf);
14880 Self::arbitrary(&mut unstructured).unwrap_or_default()
14881 }
14882}
14883impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
14884 fn default() -> Self {
14885 Self::DEFAULT.clone()
14886 }
14887}
14888impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
14889 type Message = MavMessage;
14890 const ID: u32 = 282u32;
14891 const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
14892 const EXTRA_CRC: u8 = 123u8;
14893 const ENCODED_LEN: usize = 35usize;
14894 fn deser(
14895 _version: MavlinkVersion,
14896 __input: &[u8],
14897 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14898 let avail_len = __input.len();
14899 let mut payload_buf = [0; Self::ENCODED_LEN];
14900 let mut buf = if avail_len < Self::ENCODED_LEN {
14901 payload_buf[0..avail_len].copy_from_slice(__input);
14902 Bytes::new(&payload_buf)
14903 } else {
14904 Bytes::new(__input)
14905 };
14906 let mut __struct = Self::default();
14907 let tmp = buf.get_u32_le()?;
14908 __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14909 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14910 flag_type: "GimbalManagerFlags",
14911 value: tmp as u64,
14912 })?;
14913 for v in &mut __struct.q {
14914 let val = buf.get_f32_le()?;
14915 *v = val;
14916 }
14917 __struct.angular_velocity_x = buf.get_f32_le()?;
14918 __struct.angular_velocity_y = buf.get_f32_le()?;
14919 __struct.angular_velocity_z = buf.get_f32_le()?;
14920 __struct.target_system = buf.get_u8()?;
14921 __struct.target_component = buf.get_u8()?;
14922 __struct.gimbal_device_id = buf.get_u8()?;
14923 Ok(__struct)
14924 }
14925 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14926 let mut __tmp = BytesMut::new(bytes);
14927 #[allow(clippy::absurd_extreme_comparisons)]
14928 #[allow(unused_comparisons)]
14929 if __tmp.remaining() < Self::ENCODED_LEN {
14930 panic!(
14931 "buffer is too small (need {} bytes, but got {})",
14932 Self::ENCODED_LEN,
14933 __tmp.remaining(),
14934 )
14935 }
14936 __tmp.put_u32_le(self.flags.bits() as u32);
14937 for val in &self.q {
14938 __tmp.put_f32_le(*val);
14939 }
14940 __tmp.put_f32_le(self.angular_velocity_x);
14941 __tmp.put_f32_le(self.angular_velocity_y);
14942 __tmp.put_f32_le(self.angular_velocity_z);
14943 __tmp.put_u8(self.target_system);
14944 __tmp.put_u8(self.target_component);
14945 __tmp.put_u8(self.gimbal_device_id);
14946 if matches!(version, MavlinkVersion::V2) {
14947 let len = __tmp.len();
14948 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14949 } else {
14950 __tmp.len()
14951 }
14952 }
14953}
14954#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
14955#[doc = ""]
14956#[doc = "ID: 288"]
14957#[derive(Debug, Clone, PartialEq)]
14958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14959#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14960#[cfg_attr(feature = "ts", derive(TS))]
14961#[cfg_attr(feature = "ts", ts(export))]
14962pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14963 #[doc = "High level gimbal manager flags."]
14964 pub flags: GimbalManagerFlags,
14965 #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14966 pub pitch: f32,
14967 #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14968 pub yaw: f32,
14969 #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14970 pub pitch_rate: f32,
14971 #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14972 pub yaw_rate: f32,
14973 #[doc = "System ID"]
14974 pub target_system: u8,
14975 #[doc = "Component ID"]
14976 pub target_component: u8,
14977 #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14978 pub gimbal_device_id: u8,
14979}
14980impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14981 pub const ENCODED_LEN: usize = 23usize;
14982 pub const DEFAULT: Self = Self {
14983 flags: GimbalManagerFlags::DEFAULT,
14984 pitch: 0.0_f32,
14985 yaw: 0.0_f32,
14986 pitch_rate: 0.0_f32,
14987 yaw_rate: 0.0_f32,
14988 target_system: 0_u8,
14989 target_component: 0_u8,
14990 gimbal_device_id: 0_u8,
14991 };
14992 #[cfg(feature = "arbitrary")]
14993 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14994 use arbitrary::{Arbitrary, Unstructured};
14995 let mut buf = [0u8; 1024];
14996 rng.fill_bytes(&mut buf);
14997 let mut unstructured = Unstructured::new(&buf);
14998 Self::arbitrary(&mut unstructured).unwrap_or_default()
14999 }
15000}
15001impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15002 fn default() -> Self {
15003 Self::DEFAULT.clone()
15004 }
15005}
15006impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15007 type Message = MavMessage;
15008 const ID: u32 = 288u32;
15009 const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
15010 const EXTRA_CRC: u8 = 20u8;
15011 const ENCODED_LEN: usize = 23usize;
15012 fn deser(
15013 _version: MavlinkVersion,
15014 __input: &[u8],
15015 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15016 let avail_len = __input.len();
15017 let mut payload_buf = [0; Self::ENCODED_LEN];
15018 let mut buf = if avail_len < Self::ENCODED_LEN {
15019 payload_buf[0..avail_len].copy_from_slice(__input);
15020 Bytes::new(&payload_buf)
15021 } else {
15022 Bytes::new(__input)
15023 };
15024 let mut __struct = Self::default();
15025 let tmp = buf.get_u32_le()?;
15026 __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15027 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15028 flag_type: "GimbalManagerFlags",
15029 value: tmp as u64,
15030 })?;
15031 __struct.pitch = buf.get_f32_le()?;
15032 __struct.yaw = buf.get_f32_le()?;
15033 __struct.pitch_rate = buf.get_f32_le()?;
15034 __struct.yaw_rate = buf.get_f32_le()?;
15035 __struct.target_system = buf.get_u8()?;
15036 __struct.target_component = buf.get_u8()?;
15037 __struct.gimbal_device_id = buf.get_u8()?;
15038 Ok(__struct)
15039 }
15040 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15041 let mut __tmp = BytesMut::new(bytes);
15042 #[allow(clippy::absurd_extreme_comparisons)]
15043 #[allow(unused_comparisons)]
15044 if __tmp.remaining() < Self::ENCODED_LEN {
15045 panic!(
15046 "buffer is too small (need {} bytes, but got {})",
15047 Self::ENCODED_LEN,
15048 __tmp.remaining(),
15049 )
15050 }
15051 __tmp.put_u32_le(self.flags.bits() as u32);
15052 __tmp.put_f32_le(self.pitch);
15053 __tmp.put_f32_le(self.yaw);
15054 __tmp.put_f32_le(self.pitch_rate);
15055 __tmp.put_f32_le(self.yaw_rate);
15056 __tmp.put_u8(self.target_system);
15057 __tmp.put_u8(self.target_component);
15058 __tmp.put_u8(self.gimbal_device_id);
15059 if matches!(version, MavlinkVersion::V2) {
15060 let len = __tmp.len();
15061 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15062 } else {
15063 __tmp.len()
15064 }
15065 }
15066}
15067#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
15068#[doc = ""]
15069#[doc = "ID: 287"]
15070#[derive(Debug, Clone, PartialEq)]
15071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15073#[cfg_attr(feature = "ts", derive(TS))]
15074#[cfg_attr(feature = "ts", ts(export))]
15075pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15076 #[doc = "High level gimbal manager flags to use."]
15077 pub flags: GimbalManagerFlags,
15078 #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
15079 pub pitch: f32,
15080 #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
15081 pub yaw: f32,
15082 #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
15083 pub pitch_rate: f32,
15084 #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
15085 pub yaw_rate: f32,
15086 #[doc = "System ID"]
15087 pub target_system: u8,
15088 #[doc = "Component ID"]
15089 pub target_component: u8,
15090 #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
15091 pub gimbal_device_id: u8,
15092}
15093impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15094 pub const ENCODED_LEN: usize = 23usize;
15095 pub const DEFAULT: Self = Self {
15096 flags: GimbalManagerFlags::DEFAULT,
15097 pitch: 0.0_f32,
15098 yaw: 0.0_f32,
15099 pitch_rate: 0.0_f32,
15100 yaw_rate: 0.0_f32,
15101 target_system: 0_u8,
15102 target_component: 0_u8,
15103 gimbal_device_id: 0_u8,
15104 };
15105 #[cfg(feature = "arbitrary")]
15106 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15107 use arbitrary::{Arbitrary, Unstructured};
15108 let mut buf = [0u8; 1024];
15109 rng.fill_bytes(&mut buf);
15110 let mut unstructured = Unstructured::new(&buf);
15111 Self::arbitrary(&mut unstructured).unwrap_or_default()
15112 }
15113}
15114impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15115 fn default() -> Self {
15116 Self::DEFAULT.clone()
15117 }
15118}
15119impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15120 type Message = MavMessage;
15121 const ID: u32 = 287u32;
15122 const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
15123 const EXTRA_CRC: u8 = 1u8;
15124 const ENCODED_LEN: usize = 23usize;
15125 fn deser(
15126 _version: MavlinkVersion,
15127 __input: &[u8],
15128 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15129 let avail_len = __input.len();
15130 let mut payload_buf = [0; Self::ENCODED_LEN];
15131 let mut buf = if avail_len < Self::ENCODED_LEN {
15132 payload_buf[0..avail_len].copy_from_slice(__input);
15133 Bytes::new(&payload_buf)
15134 } else {
15135 Bytes::new(__input)
15136 };
15137 let mut __struct = Self::default();
15138 let tmp = buf.get_u32_le()?;
15139 __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15140 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15141 flag_type: "GimbalManagerFlags",
15142 value: tmp as u64,
15143 })?;
15144 __struct.pitch = buf.get_f32_le()?;
15145 __struct.yaw = buf.get_f32_le()?;
15146 __struct.pitch_rate = buf.get_f32_le()?;
15147 __struct.yaw_rate = buf.get_f32_le()?;
15148 __struct.target_system = buf.get_u8()?;
15149 __struct.target_component = buf.get_u8()?;
15150 __struct.gimbal_device_id = buf.get_u8()?;
15151 Ok(__struct)
15152 }
15153 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15154 let mut __tmp = BytesMut::new(bytes);
15155 #[allow(clippy::absurd_extreme_comparisons)]
15156 #[allow(unused_comparisons)]
15157 if __tmp.remaining() < Self::ENCODED_LEN {
15158 panic!(
15159 "buffer is too small (need {} bytes, but got {})",
15160 Self::ENCODED_LEN,
15161 __tmp.remaining(),
15162 )
15163 }
15164 __tmp.put_u32_le(self.flags.bits() as u32);
15165 __tmp.put_f32_le(self.pitch);
15166 __tmp.put_f32_le(self.yaw);
15167 __tmp.put_f32_le(self.pitch_rate);
15168 __tmp.put_f32_le(self.yaw_rate);
15169 __tmp.put_u8(self.target_system);
15170 __tmp.put_u8(self.target_component);
15171 __tmp.put_u8(self.gimbal_device_id);
15172 if matches!(version, MavlinkVersion::V2) {
15173 let len = __tmp.len();
15174 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15175 } else {
15176 __tmp.len()
15177 }
15178 }
15179}
15180#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
15181#[doc = ""]
15182#[doc = "ID: 281"]
15183#[derive(Debug, Clone, PartialEq)]
15184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15186#[cfg_attr(feature = "ts", derive(TS))]
15187#[cfg_attr(feature = "ts", ts(export))]
15188pub struct GIMBAL_MANAGER_STATUS_DATA {
15189 #[doc = "Timestamp (time since system boot)."]
15190 pub time_boot_ms: u32,
15191 #[doc = "High level gimbal manager flags currently applied."]
15192 pub flags: GimbalManagerFlags,
15193 #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
15194 pub gimbal_device_id: u8,
15195 #[doc = "System ID of MAVLink component with primary control, 0 for none."]
15196 pub primary_control_sysid: u8,
15197 #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
15198 pub primary_control_compid: u8,
15199 #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
15200 pub secondary_control_sysid: u8,
15201 #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
15202 pub secondary_control_compid: u8,
15203}
15204impl GIMBAL_MANAGER_STATUS_DATA {
15205 pub const ENCODED_LEN: usize = 13usize;
15206 pub const DEFAULT: Self = Self {
15207 time_boot_ms: 0_u32,
15208 flags: GimbalManagerFlags::DEFAULT,
15209 gimbal_device_id: 0_u8,
15210 primary_control_sysid: 0_u8,
15211 primary_control_compid: 0_u8,
15212 secondary_control_sysid: 0_u8,
15213 secondary_control_compid: 0_u8,
15214 };
15215 #[cfg(feature = "arbitrary")]
15216 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15217 use arbitrary::{Arbitrary, Unstructured};
15218 let mut buf = [0u8; 1024];
15219 rng.fill_bytes(&mut buf);
15220 let mut unstructured = Unstructured::new(&buf);
15221 Self::arbitrary(&mut unstructured).unwrap_or_default()
15222 }
15223}
15224impl Default for GIMBAL_MANAGER_STATUS_DATA {
15225 fn default() -> Self {
15226 Self::DEFAULT.clone()
15227 }
15228}
15229impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
15230 type Message = MavMessage;
15231 const ID: u32 = 281u32;
15232 const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
15233 const EXTRA_CRC: u8 = 48u8;
15234 const ENCODED_LEN: usize = 13usize;
15235 fn deser(
15236 _version: MavlinkVersion,
15237 __input: &[u8],
15238 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15239 let avail_len = __input.len();
15240 let mut payload_buf = [0; Self::ENCODED_LEN];
15241 let mut buf = if avail_len < Self::ENCODED_LEN {
15242 payload_buf[0..avail_len].copy_from_slice(__input);
15243 Bytes::new(&payload_buf)
15244 } else {
15245 Bytes::new(__input)
15246 };
15247 let mut __struct = Self::default();
15248 __struct.time_boot_ms = buf.get_u32_le()?;
15249 let tmp = buf.get_u32_le()?;
15250 __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15251 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15252 flag_type: "GimbalManagerFlags",
15253 value: tmp as u64,
15254 })?;
15255 __struct.gimbal_device_id = buf.get_u8()?;
15256 __struct.primary_control_sysid = buf.get_u8()?;
15257 __struct.primary_control_compid = buf.get_u8()?;
15258 __struct.secondary_control_sysid = buf.get_u8()?;
15259 __struct.secondary_control_compid = buf.get_u8()?;
15260 Ok(__struct)
15261 }
15262 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15263 let mut __tmp = BytesMut::new(bytes);
15264 #[allow(clippy::absurd_extreme_comparisons)]
15265 #[allow(unused_comparisons)]
15266 if __tmp.remaining() < Self::ENCODED_LEN {
15267 panic!(
15268 "buffer is too small (need {} bytes, but got {})",
15269 Self::ENCODED_LEN,
15270 __tmp.remaining(),
15271 )
15272 }
15273 __tmp.put_u32_le(self.time_boot_ms);
15274 __tmp.put_u32_le(self.flags.bits() as u32);
15275 __tmp.put_u8(self.gimbal_device_id);
15276 __tmp.put_u8(self.primary_control_sysid);
15277 __tmp.put_u8(self.primary_control_compid);
15278 __tmp.put_u8(self.secondary_control_sysid);
15279 __tmp.put_u8(self.secondary_control_compid);
15280 if matches!(version, MavlinkVersion::V2) {
15281 let len = __tmp.len();
15282 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15283 } else {
15284 __tmp.len()
15285 }
15286 }
15287}
15288#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient."]
15289#[doc = ""]
15290#[doc = "ID: 33"]
15291#[derive(Debug, Clone, PartialEq)]
15292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15294#[cfg_attr(feature = "ts", derive(TS))]
15295#[cfg_attr(feature = "ts", ts(export))]
15296pub struct GLOBAL_POSITION_INT_DATA {
15297 #[doc = "Timestamp (time since system boot)."]
15298 pub time_boot_ms: u32,
15299 #[doc = "Latitude, expressed"]
15300 pub lat: i32,
15301 #[doc = "Longitude, expressed"]
15302 pub lon: i32,
15303 #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
15304 pub alt: i32,
15305 #[doc = "Altitude above home"]
15306 pub relative_alt: i32,
15307 #[doc = "Ground X Speed (Latitude, positive north)"]
15308 pub vx: i16,
15309 #[doc = "Ground Y Speed (Longitude, positive east)"]
15310 pub vy: i16,
15311 #[doc = "Ground Z Speed (Altitude, positive down)"]
15312 pub vz: i16,
15313 #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15314 pub hdg: u16,
15315}
15316impl GLOBAL_POSITION_INT_DATA {
15317 pub const ENCODED_LEN: usize = 28usize;
15318 pub const DEFAULT: Self = Self {
15319 time_boot_ms: 0_u32,
15320 lat: 0_i32,
15321 lon: 0_i32,
15322 alt: 0_i32,
15323 relative_alt: 0_i32,
15324 vx: 0_i16,
15325 vy: 0_i16,
15326 vz: 0_i16,
15327 hdg: 0_u16,
15328 };
15329 #[cfg(feature = "arbitrary")]
15330 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15331 use arbitrary::{Arbitrary, Unstructured};
15332 let mut buf = [0u8; 1024];
15333 rng.fill_bytes(&mut buf);
15334 let mut unstructured = Unstructured::new(&buf);
15335 Self::arbitrary(&mut unstructured).unwrap_or_default()
15336 }
15337}
15338impl Default for GLOBAL_POSITION_INT_DATA {
15339 fn default() -> Self {
15340 Self::DEFAULT.clone()
15341 }
15342}
15343impl MessageData for GLOBAL_POSITION_INT_DATA {
15344 type Message = MavMessage;
15345 const ID: u32 = 33u32;
15346 const NAME: &'static str = "GLOBAL_POSITION_INT";
15347 const EXTRA_CRC: u8 = 104u8;
15348 const ENCODED_LEN: usize = 28usize;
15349 fn deser(
15350 _version: MavlinkVersion,
15351 __input: &[u8],
15352 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15353 let avail_len = __input.len();
15354 let mut payload_buf = [0; Self::ENCODED_LEN];
15355 let mut buf = if avail_len < Self::ENCODED_LEN {
15356 payload_buf[0..avail_len].copy_from_slice(__input);
15357 Bytes::new(&payload_buf)
15358 } else {
15359 Bytes::new(__input)
15360 };
15361 let mut __struct = Self::default();
15362 __struct.time_boot_ms = buf.get_u32_le()?;
15363 __struct.lat = buf.get_i32_le()?;
15364 __struct.lon = buf.get_i32_le()?;
15365 __struct.alt = buf.get_i32_le()?;
15366 __struct.relative_alt = buf.get_i32_le()?;
15367 __struct.vx = buf.get_i16_le()?;
15368 __struct.vy = buf.get_i16_le()?;
15369 __struct.vz = buf.get_i16_le()?;
15370 __struct.hdg = buf.get_u16_le()?;
15371 Ok(__struct)
15372 }
15373 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15374 let mut __tmp = BytesMut::new(bytes);
15375 #[allow(clippy::absurd_extreme_comparisons)]
15376 #[allow(unused_comparisons)]
15377 if __tmp.remaining() < Self::ENCODED_LEN {
15378 panic!(
15379 "buffer is too small (need {} bytes, but got {})",
15380 Self::ENCODED_LEN,
15381 __tmp.remaining(),
15382 )
15383 }
15384 __tmp.put_u32_le(self.time_boot_ms);
15385 __tmp.put_i32_le(self.lat);
15386 __tmp.put_i32_le(self.lon);
15387 __tmp.put_i32_le(self.alt);
15388 __tmp.put_i32_le(self.relative_alt);
15389 __tmp.put_i16_le(self.vx);
15390 __tmp.put_i16_le(self.vy);
15391 __tmp.put_i16_le(self.vz);
15392 __tmp.put_u16_le(self.hdg);
15393 if matches!(version, MavlinkVersion::V2) {
15394 let len = __tmp.len();
15395 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15396 } else {
15397 __tmp.len()
15398 }
15399 }
15400}
15401#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
15402#[doc = ""]
15403#[doc = "ID: 63"]
15404#[derive(Debug, Clone, PartialEq)]
15405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15407#[cfg_attr(feature = "ts", derive(TS))]
15408#[cfg_attr(feature = "ts", ts(export))]
15409pub struct GLOBAL_POSITION_INT_COV_DATA {
15410 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15411 pub time_usec: u64,
15412 #[doc = "Latitude"]
15413 pub lat: i32,
15414 #[doc = "Longitude"]
15415 pub lon: i32,
15416 #[doc = "Altitude in meters above MSL"]
15417 pub alt: i32,
15418 #[doc = "Altitude above ground"]
15419 pub relative_alt: i32,
15420 #[doc = "Ground X Speed (Latitude)"]
15421 pub vx: f32,
15422 #[doc = "Ground Y Speed (Longitude)"]
15423 pub vy: f32,
15424 #[doc = "Ground Z Speed (Altitude)"]
15425 pub vz: f32,
15426 #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
15427 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15428 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15429 pub covariance: [f32; 36],
15430 #[doc = "Class id of the estimator this estimate originated from."]
15431 pub estimator_type: MavEstimatorType,
15432}
15433impl GLOBAL_POSITION_INT_COV_DATA {
15434 pub const ENCODED_LEN: usize = 181usize;
15435 pub const DEFAULT: Self = Self {
15436 time_usec: 0_u64,
15437 lat: 0_i32,
15438 lon: 0_i32,
15439 alt: 0_i32,
15440 relative_alt: 0_i32,
15441 vx: 0.0_f32,
15442 vy: 0.0_f32,
15443 vz: 0.0_f32,
15444 covariance: [0.0_f32; 36usize],
15445 estimator_type: MavEstimatorType::DEFAULT,
15446 };
15447 #[cfg(feature = "arbitrary")]
15448 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15449 use arbitrary::{Arbitrary, Unstructured};
15450 let mut buf = [0u8; 1024];
15451 rng.fill_bytes(&mut buf);
15452 let mut unstructured = Unstructured::new(&buf);
15453 Self::arbitrary(&mut unstructured).unwrap_or_default()
15454 }
15455}
15456impl Default for GLOBAL_POSITION_INT_COV_DATA {
15457 fn default() -> Self {
15458 Self::DEFAULT.clone()
15459 }
15460}
15461impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
15462 type Message = MavMessage;
15463 const ID: u32 = 63u32;
15464 const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
15465 const EXTRA_CRC: u8 = 119u8;
15466 const ENCODED_LEN: usize = 181usize;
15467 fn deser(
15468 _version: MavlinkVersion,
15469 __input: &[u8],
15470 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15471 let avail_len = __input.len();
15472 let mut payload_buf = [0; Self::ENCODED_LEN];
15473 let mut buf = if avail_len < Self::ENCODED_LEN {
15474 payload_buf[0..avail_len].copy_from_slice(__input);
15475 Bytes::new(&payload_buf)
15476 } else {
15477 Bytes::new(__input)
15478 };
15479 let mut __struct = Self::default();
15480 __struct.time_usec = buf.get_u64_le()?;
15481 __struct.lat = buf.get_i32_le()?;
15482 __struct.lon = buf.get_i32_le()?;
15483 __struct.alt = buf.get_i32_le()?;
15484 __struct.relative_alt = buf.get_i32_le()?;
15485 __struct.vx = buf.get_f32_le()?;
15486 __struct.vy = buf.get_f32_le()?;
15487 __struct.vz = buf.get_f32_le()?;
15488 for v in &mut __struct.covariance {
15489 let val = buf.get_f32_le()?;
15490 *v = val;
15491 }
15492 let tmp = buf.get_u8()?;
15493 __struct.estimator_type =
15494 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15495 enum_type: "MavEstimatorType",
15496 value: tmp as u64,
15497 })?;
15498 Ok(__struct)
15499 }
15500 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15501 let mut __tmp = BytesMut::new(bytes);
15502 #[allow(clippy::absurd_extreme_comparisons)]
15503 #[allow(unused_comparisons)]
15504 if __tmp.remaining() < Self::ENCODED_LEN {
15505 panic!(
15506 "buffer is too small (need {} bytes, but got {})",
15507 Self::ENCODED_LEN,
15508 __tmp.remaining(),
15509 )
15510 }
15511 __tmp.put_u64_le(self.time_usec);
15512 __tmp.put_i32_le(self.lat);
15513 __tmp.put_i32_le(self.lon);
15514 __tmp.put_i32_le(self.alt);
15515 __tmp.put_i32_le(self.relative_alt);
15516 __tmp.put_f32_le(self.vx);
15517 __tmp.put_f32_le(self.vy);
15518 __tmp.put_f32_le(self.vz);
15519 for val in &self.covariance {
15520 __tmp.put_f32_le(*val);
15521 }
15522 __tmp.put_u8(self.estimator_type as u8);
15523 if matches!(version, MavlinkVersion::V2) {
15524 let len = __tmp.len();
15525 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15526 } else {
15527 __tmp.len()
15528 }
15529 }
15530}
15531#[doc = "Global position/attitude estimate from a vision source."]
15532#[doc = ""]
15533#[doc = "ID: 101"]
15534#[derive(Debug, Clone, PartialEq)]
15535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15537#[cfg_attr(feature = "ts", derive(TS))]
15538#[cfg_attr(feature = "ts", ts(export))]
15539pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
15540 #[doc = "Timestamp (UNIX time or since system boot)"]
15541 pub usec: u64,
15542 #[doc = "Global X position"]
15543 pub x: f32,
15544 #[doc = "Global Y position"]
15545 pub y: f32,
15546 #[doc = "Global Z position"]
15547 pub z: f32,
15548 #[doc = "Roll angle"]
15549 pub roll: f32,
15550 #[doc = "Pitch angle"]
15551 pub pitch: f32,
15552 #[doc = "Yaw angle"]
15553 pub yaw: f32,
15554 #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
15555 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15556 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15557 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15558 pub covariance: [f32; 21],
15559 #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
15560 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15561 pub reset_counter: u8,
15562}
15563impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
15564 pub const ENCODED_LEN: usize = 117usize;
15565 pub const DEFAULT: Self = Self {
15566 usec: 0_u64,
15567 x: 0.0_f32,
15568 y: 0.0_f32,
15569 z: 0.0_f32,
15570 roll: 0.0_f32,
15571 pitch: 0.0_f32,
15572 yaw: 0.0_f32,
15573 covariance: [0.0_f32; 21usize],
15574 reset_counter: 0_u8,
15575 };
15576 #[cfg(feature = "arbitrary")]
15577 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15578 use arbitrary::{Arbitrary, Unstructured};
15579 let mut buf = [0u8; 1024];
15580 rng.fill_bytes(&mut buf);
15581 let mut unstructured = Unstructured::new(&buf);
15582 Self::arbitrary(&mut unstructured).unwrap_or_default()
15583 }
15584}
15585impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
15586 fn default() -> Self {
15587 Self::DEFAULT.clone()
15588 }
15589}
15590impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
15591 type Message = MavMessage;
15592 const ID: u32 = 101u32;
15593 const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
15594 const EXTRA_CRC: u8 = 102u8;
15595 const ENCODED_LEN: usize = 117usize;
15596 fn deser(
15597 _version: MavlinkVersion,
15598 __input: &[u8],
15599 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15600 let avail_len = __input.len();
15601 let mut payload_buf = [0; Self::ENCODED_LEN];
15602 let mut buf = if avail_len < Self::ENCODED_LEN {
15603 payload_buf[0..avail_len].copy_from_slice(__input);
15604 Bytes::new(&payload_buf)
15605 } else {
15606 Bytes::new(__input)
15607 };
15608 let mut __struct = Self::default();
15609 __struct.usec = buf.get_u64_le()?;
15610 __struct.x = buf.get_f32_le()?;
15611 __struct.y = buf.get_f32_le()?;
15612 __struct.z = buf.get_f32_le()?;
15613 __struct.roll = buf.get_f32_le()?;
15614 __struct.pitch = buf.get_f32_le()?;
15615 __struct.yaw = buf.get_f32_le()?;
15616 for v in &mut __struct.covariance {
15617 let val = buf.get_f32_le()?;
15618 *v = val;
15619 }
15620 __struct.reset_counter = buf.get_u8()?;
15621 Ok(__struct)
15622 }
15623 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15624 let mut __tmp = BytesMut::new(bytes);
15625 #[allow(clippy::absurd_extreme_comparisons)]
15626 #[allow(unused_comparisons)]
15627 if __tmp.remaining() < Self::ENCODED_LEN {
15628 panic!(
15629 "buffer is too small (need {} bytes, but got {})",
15630 Self::ENCODED_LEN,
15631 __tmp.remaining(),
15632 )
15633 }
15634 __tmp.put_u64_le(self.usec);
15635 __tmp.put_f32_le(self.x);
15636 __tmp.put_f32_le(self.y);
15637 __tmp.put_f32_le(self.z);
15638 __tmp.put_f32_le(self.roll);
15639 __tmp.put_f32_le(self.pitch);
15640 __tmp.put_f32_le(self.yaw);
15641 if matches!(version, MavlinkVersion::V2) {
15642 for val in &self.covariance {
15643 __tmp.put_f32_le(*val);
15644 }
15645 __tmp.put_u8(self.reset_counter);
15646 let len = __tmp.len();
15647 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15648 } else {
15649 __tmp.len()
15650 }
15651 }
15652}
15653#[doc = "Second GPS data."]
15654#[doc = ""]
15655#[doc = "ID: 124"]
15656#[derive(Debug, Clone, PartialEq)]
15657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15659#[cfg_attr(feature = "ts", derive(TS))]
15660#[cfg_attr(feature = "ts", ts(export))]
15661pub struct GPS2_RAW_DATA {
15662 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15663 pub time_usec: u64,
15664 #[doc = "Latitude (WGS84)"]
15665 pub lat: i32,
15666 #[doc = "Longitude (WGS84)"]
15667 pub lon: i32,
15668 #[doc = "Altitude (MSL). Positive for up."]
15669 pub alt: i32,
15670 #[doc = "Age of DGPS info"]
15671 pub dgps_age: u32,
15672 #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15673 pub eph: u16,
15674 #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15675 pub epv: u16,
15676 #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15677 pub vel: u16,
15678 #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15679 pub cog: u16,
15680 #[doc = "GPS fix type."]
15681 pub fix_type: GpsFixType,
15682 #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15683 pub satellites_visible: u8,
15684 #[doc = "Number of DGPS satellites"]
15685 pub dgps_numch: u8,
15686 #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15687 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15688 pub yaw: u16,
15689 #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15690 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15691 pub alt_ellipsoid: i32,
15692 #[doc = "Position uncertainty."]
15693 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15694 pub h_acc: u32,
15695 #[doc = "Altitude uncertainty."]
15696 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15697 pub v_acc: u32,
15698 #[doc = "Speed uncertainty."]
15699 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15700 pub vel_acc: u32,
15701 #[doc = "Heading / track uncertainty"]
15702 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15703 pub hdg_acc: u32,
15704}
15705impl GPS2_RAW_DATA {
15706 pub const ENCODED_LEN: usize = 57usize;
15707 pub const DEFAULT: Self = Self {
15708 time_usec: 0_u64,
15709 lat: 0_i32,
15710 lon: 0_i32,
15711 alt: 0_i32,
15712 dgps_age: 0_u32,
15713 eph: 0_u16,
15714 epv: 0_u16,
15715 vel: 0_u16,
15716 cog: 0_u16,
15717 fix_type: GpsFixType::DEFAULT,
15718 satellites_visible: 0_u8,
15719 dgps_numch: 0_u8,
15720 yaw: 0_u16,
15721 alt_ellipsoid: 0_i32,
15722 h_acc: 0_u32,
15723 v_acc: 0_u32,
15724 vel_acc: 0_u32,
15725 hdg_acc: 0_u32,
15726 };
15727 #[cfg(feature = "arbitrary")]
15728 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15729 use arbitrary::{Arbitrary, Unstructured};
15730 let mut buf = [0u8; 1024];
15731 rng.fill_bytes(&mut buf);
15732 let mut unstructured = Unstructured::new(&buf);
15733 Self::arbitrary(&mut unstructured).unwrap_or_default()
15734 }
15735}
15736impl Default for GPS2_RAW_DATA {
15737 fn default() -> Self {
15738 Self::DEFAULT.clone()
15739 }
15740}
15741impl MessageData for GPS2_RAW_DATA {
15742 type Message = MavMessage;
15743 const ID: u32 = 124u32;
15744 const NAME: &'static str = "GPS2_RAW";
15745 const EXTRA_CRC: u8 = 87u8;
15746 const ENCODED_LEN: usize = 57usize;
15747 fn deser(
15748 _version: MavlinkVersion,
15749 __input: &[u8],
15750 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15751 let avail_len = __input.len();
15752 let mut payload_buf = [0; Self::ENCODED_LEN];
15753 let mut buf = if avail_len < Self::ENCODED_LEN {
15754 payload_buf[0..avail_len].copy_from_slice(__input);
15755 Bytes::new(&payload_buf)
15756 } else {
15757 Bytes::new(__input)
15758 };
15759 let mut __struct = Self::default();
15760 __struct.time_usec = buf.get_u64_le()?;
15761 __struct.lat = buf.get_i32_le()?;
15762 __struct.lon = buf.get_i32_le()?;
15763 __struct.alt = buf.get_i32_le()?;
15764 __struct.dgps_age = buf.get_u32_le()?;
15765 __struct.eph = buf.get_u16_le()?;
15766 __struct.epv = buf.get_u16_le()?;
15767 __struct.vel = buf.get_u16_le()?;
15768 __struct.cog = buf.get_u16_le()?;
15769 let tmp = buf.get_u8()?;
15770 __struct.fix_type =
15771 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15772 enum_type: "GpsFixType",
15773 value: tmp as u64,
15774 })?;
15775 __struct.satellites_visible = buf.get_u8()?;
15776 __struct.dgps_numch = buf.get_u8()?;
15777 __struct.yaw = buf.get_u16_le()?;
15778 __struct.alt_ellipsoid = buf.get_i32_le()?;
15779 __struct.h_acc = buf.get_u32_le()?;
15780 __struct.v_acc = buf.get_u32_le()?;
15781 __struct.vel_acc = buf.get_u32_le()?;
15782 __struct.hdg_acc = buf.get_u32_le()?;
15783 Ok(__struct)
15784 }
15785 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15786 let mut __tmp = BytesMut::new(bytes);
15787 #[allow(clippy::absurd_extreme_comparisons)]
15788 #[allow(unused_comparisons)]
15789 if __tmp.remaining() < Self::ENCODED_LEN {
15790 panic!(
15791 "buffer is too small (need {} bytes, but got {})",
15792 Self::ENCODED_LEN,
15793 __tmp.remaining(),
15794 )
15795 }
15796 __tmp.put_u64_le(self.time_usec);
15797 __tmp.put_i32_le(self.lat);
15798 __tmp.put_i32_le(self.lon);
15799 __tmp.put_i32_le(self.alt);
15800 __tmp.put_u32_le(self.dgps_age);
15801 __tmp.put_u16_le(self.eph);
15802 __tmp.put_u16_le(self.epv);
15803 __tmp.put_u16_le(self.vel);
15804 __tmp.put_u16_le(self.cog);
15805 __tmp.put_u8(self.fix_type as u8);
15806 __tmp.put_u8(self.satellites_visible);
15807 __tmp.put_u8(self.dgps_numch);
15808 if matches!(version, MavlinkVersion::V2) {
15809 __tmp.put_u16_le(self.yaw);
15810 __tmp.put_i32_le(self.alt_ellipsoid);
15811 __tmp.put_u32_le(self.h_acc);
15812 __tmp.put_u32_le(self.v_acc);
15813 __tmp.put_u32_le(self.vel_acc);
15814 __tmp.put_u32_le(self.hdg_acc);
15815 let len = __tmp.len();
15816 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15817 } else {
15818 __tmp.len()
15819 }
15820 }
15821}
15822#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15823#[doc = ""]
15824#[doc = "ID: 128"]
15825#[derive(Debug, Clone, PartialEq)]
15826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15828#[cfg_attr(feature = "ts", derive(TS))]
15829#[cfg_attr(feature = "ts", ts(export))]
15830pub struct GPS2_RTK_DATA {
15831 #[doc = "Time since boot of last baseline message received."]
15832 pub time_last_baseline_ms: u32,
15833 #[doc = "GPS Time of Week of last baseline"]
15834 pub tow: u32,
15835 #[doc = "Current baseline in ECEF x or NED north component."]
15836 pub baseline_a_mm: i32,
15837 #[doc = "Current baseline in ECEF y or NED east component."]
15838 pub baseline_b_mm: i32,
15839 #[doc = "Current baseline in ECEF z or NED down component."]
15840 pub baseline_c_mm: i32,
15841 #[doc = "Current estimate of baseline accuracy."]
15842 pub accuracy: u32,
15843 #[doc = "Current number of integer ambiguity hypotheses."]
15844 pub iar_num_hypotheses: i32,
15845 #[doc = "GPS Week Number of last baseline"]
15846 pub wn: u16,
15847 #[doc = "Identification of connected RTK receiver."]
15848 pub rtk_receiver_id: u8,
15849 #[doc = "GPS-specific health report for RTK data."]
15850 pub rtk_health: u8,
15851 #[doc = "Rate of baseline messages being received by GPS"]
15852 pub rtk_rate: u8,
15853 #[doc = "Current number of sats used for RTK calculation."]
15854 pub nsats: u8,
15855 #[doc = "Coordinate system of baseline"]
15856 pub baseline_coords_type: RtkBaselineCoordinateSystem,
15857}
15858impl GPS2_RTK_DATA {
15859 pub const ENCODED_LEN: usize = 35usize;
15860 pub const DEFAULT: Self = Self {
15861 time_last_baseline_ms: 0_u32,
15862 tow: 0_u32,
15863 baseline_a_mm: 0_i32,
15864 baseline_b_mm: 0_i32,
15865 baseline_c_mm: 0_i32,
15866 accuracy: 0_u32,
15867 iar_num_hypotheses: 0_i32,
15868 wn: 0_u16,
15869 rtk_receiver_id: 0_u8,
15870 rtk_health: 0_u8,
15871 rtk_rate: 0_u8,
15872 nsats: 0_u8,
15873 baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15874 };
15875 #[cfg(feature = "arbitrary")]
15876 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15877 use arbitrary::{Arbitrary, Unstructured};
15878 let mut buf = [0u8; 1024];
15879 rng.fill_bytes(&mut buf);
15880 let mut unstructured = Unstructured::new(&buf);
15881 Self::arbitrary(&mut unstructured).unwrap_or_default()
15882 }
15883}
15884impl Default for GPS2_RTK_DATA {
15885 fn default() -> Self {
15886 Self::DEFAULT.clone()
15887 }
15888}
15889impl MessageData for GPS2_RTK_DATA {
15890 type Message = MavMessage;
15891 const ID: u32 = 128u32;
15892 const NAME: &'static str = "GPS2_RTK";
15893 const EXTRA_CRC: u8 = 226u8;
15894 const ENCODED_LEN: usize = 35usize;
15895 fn deser(
15896 _version: MavlinkVersion,
15897 __input: &[u8],
15898 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15899 let avail_len = __input.len();
15900 let mut payload_buf = [0; Self::ENCODED_LEN];
15901 let mut buf = if avail_len < Self::ENCODED_LEN {
15902 payload_buf[0..avail_len].copy_from_slice(__input);
15903 Bytes::new(&payload_buf)
15904 } else {
15905 Bytes::new(__input)
15906 };
15907 let mut __struct = Self::default();
15908 __struct.time_last_baseline_ms = buf.get_u32_le()?;
15909 __struct.tow = buf.get_u32_le()?;
15910 __struct.baseline_a_mm = buf.get_i32_le()?;
15911 __struct.baseline_b_mm = buf.get_i32_le()?;
15912 __struct.baseline_c_mm = buf.get_i32_le()?;
15913 __struct.accuracy = buf.get_u32_le()?;
15914 __struct.iar_num_hypotheses = buf.get_i32_le()?;
15915 __struct.wn = buf.get_u16_le()?;
15916 __struct.rtk_receiver_id = buf.get_u8()?;
15917 __struct.rtk_health = buf.get_u8()?;
15918 __struct.rtk_rate = buf.get_u8()?;
15919 __struct.nsats = buf.get_u8()?;
15920 let tmp = buf.get_u8()?;
15921 __struct.baseline_coords_type =
15922 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15923 enum_type: "RtkBaselineCoordinateSystem",
15924 value: tmp as u64,
15925 })?;
15926 Ok(__struct)
15927 }
15928 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15929 let mut __tmp = BytesMut::new(bytes);
15930 #[allow(clippy::absurd_extreme_comparisons)]
15931 #[allow(unused_comparisons)]
15932 if __tmp.remaining() < Self::ENCODED_LEN {
15933 panic!(
15934 "buffer is too small (need {} bytes, but got {})",
15935 Self::ENCODED_LEN,
15936 __tmp.remaining(),
15937 )
15938 }
15939 __tmp.put_u32_le(self.time_last_baseline_ms);
15940 __tmp.put_u32_le(self.tow);
15941 __tmp.put_i32_le(self.baseline_a_mm);
15942 __tmp.put_i32_le(self.baseline_b_mm);
15943 __tmp.put_i32_le(self.baseline_c_mm);
15944 __tmp.put_u32_le(self.accuracy);
15945 __tmp.put_i32_le(self.iar_num_hypotheses);
15946 __tmp.put_u16_le(self.wn);
15947 __tmp.put_u8(self.rtk_receiver_id);
15948 __tmp.put_u8(self.rtk_health);
15949 __tmp.put_u8(self.rtk_rate);
15950 __tmp.put_u8(self.nsats);
15951 __tmp.put_u8(self.baseline_coords_type as u8);
15952 if matches!(version, MavlinkVersion::V2) {
15953 let len = __tmp.len();
15954 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15955 } else {
15956 __tmp.len()
15957 }
15958 }
15959}
15960#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
15961#[doc = ""]
15962#[doc = "ID: 49"]
15963#[derive(Debug, Clone, PartialEq)]
15964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15966#[cfg_attr(feature = "ts", derive(TS))]
15967#[cfg_attr(feature = "ts", ts(export))]
15968pub struct GPS_GLOBAL_ORIGIN_DATA {
15969 #[doc = "Latitude (WGS84)"]
15970 pub latitude: i32,
15971 #[doc = "Longitude (WGS84)"]
15972 pub longitude: i32,
15973 #[doc = "Altitude (MSL). Positive for up."]
15974 pub altitude: i32,
15975 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15976 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15977 pub time_usec: u64,
15978}
15979impl GPS_GLOBAL_ORIGIN_DATA {
15980 pub const ENCODED_LEN: usize = 20usize;
15981 pub const DEFAULT: Self = Self {
15982 latitude: 0_i32,
15983 longitude: 0_i32,
15984 altitude: 0_i32,
15985 time_usec: 0_u64,
15986 };
15987 #[cfg(feature = "arbitrary")]
15988 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15989 use arbitrary::{Arbitrary, Unstructured};
15990 let mut buf = [0u8; 1024];
15991 rng.fill_bytes(&mut buf);
15992 let mut unstructured = Unstructured::new(&buf);
15993 Self::arbitrary(&mut unstructured).unwrap_or_default()
15994 }
15995}
15996impl Default for GPS_GLOBAL_ORIGIN_DATA {
15997 fn default() -> Self {
15998 Self::DEFAULT.clone()
15999 }
16000}
16001impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
16002 type Message = MavMessage;
16003 const ID: u32 = 49u32;
16004 const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
16005 const EXTRA_CRC: u8 = 39u8;
16006 const ENCODED_LEN: usize = 20usize;
16007 fn deser(
16008 _version: MavlinkVersion,
16009 __input: &[u8],
16010 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16011 let avail_len = __input.len();
16012 let mut payload_buf = [0; Self::ENCODED_LEN];
16013 let mut buf = if avail_len < Self::ENCODED_LEN {
16014 payload_buf[0..avail_len].copy_from_slice(__input);
16015 Bytes::new(&payload_buf)
16016 } else {
16017 Bytes::new(__input)
16018 };
16019 let mut __struct = Self::default();
16020 __struct.latitude = buf.get_i32_le()?;
16021 __struct.longitude = buf.get_i32_le()?;
16022 __struct.altitude = buf.get_i32_le()?;
16023 __struct.time_usec = buf.get_u64_le()?;
16024 Ok(__struct)
16025 }
16026 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16027 let mut __tmp = BytesMut::new(bytes);
16028 #[allow(clippy::absurd_extreme_comparisons)]
16029 #[allow(unused_comparisons)]
16030 if __tmp.remaining() < Self::ENCODED_LEN {
16031 panic!(
16032 "buffer is too small (need {} bytes, but got {})",
16033 Self::ENCODED_LEN,
16034 __tmp.remaining(),
16035 )
16036 }
16037 __tmp.put_i32_le(self.latitude);
16038 __tmp.put_i32_le(self.longitude);
16039 __tmp.put_i32_le(self.altitude);
16040 if matches!(version, MavlinkVersion::V2) {
16041 __tmp.put_u64_le(self.time_usec);
16042 let len = __tmp.len();
16043 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16044 } else {
16045 __tmp.len()
16046 }
16047 }
16048}
16049#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
16050#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
16051#[doc = ""]
16052#[doc = "ID: 123"]
16053#[derive(Debug, Clone, PartialEq)]
16054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16056#[cfg_attr(feature = "ts", derive(TS))]
16057#[cfg_attr(feature = "ts", ts(export))]
16058pub struct GPS_INJECT_DATA_DATA {
16059 #[doc = "System ID"]
16060 pub target_system: u8,
16061 #[doc = "Component ID"]
16062 pub target_component: u8,
16063 #[doc = "Data length"]
16064 pub len: u8,
16065 #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
16066 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16067 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16068 pub data: [u8; 110],
16069}
16070impl GPS_INJECT_DATA_DATA {
16071 pub const ENCODED_LEN: usize = 113usize;
16072 pub const DEFAULT: Self = Self {
16073 target_system: 0_u8,
16074 target_component: 0_u8,
16075 len: 0_u8,
16076 data: [0_u8; 110usize],
16077 };
16078 #[cfg(feature = "arbitrary")]
16079 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16080 use arbitrary::{Arbitrary, Unstructured};
16081 let mut buf = [0u8; 1024];
16082 rng.fill_bytes(&mut buf);
16083 let mut unstructured = Unstructured::new(&buf);
16084 Self::arbitrary(&mut unstructured).unwrap_or_default()
16085 }
16086}
16087impl Default for GPS_INJECT_DATA_DATA {
16088 fn default() -> Self {
16089 Self::DEFAULT.clone()
16090 }
16091}
16092impl MessageData for GPS_INJECT_DATA_DATA {
16093 type Message = MavMessage;
16094 const ID: u32 = 123u32;
16095 const NAME: &'static str = "GPS_INJECT_DATA";
16096 const EXTRA_CRC: u8 = 250u8;
16097 const ENCODED_LEN: usize = 113usize;
16098 fn deser(
16099 _version: MavlinkVersion,
16100 __input: &[u8],
16101 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16102 let avail_len = __input.len();
16103 let mut payload_buf = [0; Self::ENCODED_LEN];
16104 let mut buf = if avail_len < Self::ENCODED_LEN {
16105 payload_buf[0..avail_len].copy_from_slice(__input);
16106 Bytes::new(&payload_buf)
16107 } else {
16108 Bytes::new(__input)
16109 };
16110 let mut __struct = Self::default();
16111 __struct.target_system = buf.get_u8()?;
16112 __struct.target_component = buf.get_u8()?;
16113 __struct.len = buf.get_u8()?;
16114 for v in &mut __struct.data {
16115 let val = buf.get_u8()?;
16116 *v = val;
16117 }
16118 Ok(__struct)
16119 }
16120 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16121 let mut __tmp = BytesMut::new(bytes);
16122 #[allow(clippy::absurd_extreme_comparisons)]
16123 #[allow(unused_comparisons)]
16124 if __tmp.remaining() < Self::ENCODED_LEN {
16125 panic!(
16126 "buffer is too small (need {} bytes, but got {})",
16127 Self::ENCODED_LEN,
16128 __tmp.remaining(),
16129 )
16130 }
16131 __tmp.put_u8(self.target_system);
16132 __tmp.put_u8(self.target_component);
16133 __tmp.put_u8(self.len);
16134 for val in &self.data {
16135 __tmp.put_u8(*val);
16136 }
16137 if matches!(version, MavlinkVersion::V2) {
16138 let len = __tmp.len();
16139 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16140 } else {
16141 __tmp.len()
16142 }
16143 }
16144}
16145#[doc = "GPS sensor input message. This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
16146#[doc = ""]
16147#[doc = "ID: 232"]
16148#[derive(Debug, Clone, PartialEq)]
16149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16151#[cfg_attr(feature = "ts", derive(TS))]
16152#[cfg_attr(feature = "ts", ts(export))]
16153pub struct GPS_INPUT_DATA {
16154 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16155 pub time_usec: u64,
16156 #[doc = "GPS time (from start of GPS week)"]
16157 pub time_week_ms: u32,
16158 #[doc = "Latitude (WGS84)"]
16159 pub lat: i32,
16160 #[doc = "Longitude (WGS84)"]
16161 pub lon: i32,
16162 #[doc = "Altitude (MSL). Positive for up."]
16163 pub alt: f32,
16164 #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
16165 pub hdop: f32,
16166 #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
16167 pub vdop: f32,
16168 #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16169 pub vn: f32,
16170 #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16171 pub ve: f32,
16172 #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16173 pub vd: f32,
16174 #[doc = "GPS speed accuracy"]
16175 pub speed_accuracy: f32,
16176 #[doc = "GPS horizontal accuracy"]
16177 pub horiz_accuracy: f32,
16178 #[doc = "GPS vertical accuracy"]
16179 pub vert_accuracy: f32,
16180 #[doc = "Bitmap indicating which GPS input flags fields to ignore. All other fields must be provided."]
16181 pub ignore_flags: GpsInputIgnoreFlags,
16182 #[doc = "GPS week number"]
16183 pub time_week: u16,
16184 #[doc = "ID of the GPS for multiple GPS inputs"]
16185 pub gps_id: u8,
16186 #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
16187 pub fix_type: u8,
16188 #[doc = "Number of satellites visible."]
16189 pub satellites_visible: u8,
16190 #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16191 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16192 pub yaw: u16,
16193}
16194impl GPS_INPUT_DATA {
16195 pub const ENCODED_LEN: usize = 65usize;
16196 pub const DEFAULT: Self = Self {
16197 time_usec: 0_u64,
16198 time_week_ms: 0_u32,
16199 lat: 0_i32,
16200 lon: 0_i32,
16201 alt: 0.0_f32,
16202 hdop: 0.0_f32,
16203 vdop: 0.0_f32,
16204 vn: 0.0_f32,
16205 ve: 0.0_f32,
16206 vd: 0.0_f32,
16207 speed_accuracy: 0.0_f32,
16208 horiz_accuracy: 0.0_f32,
16209 vert_accuracy: 0.0_f32,
16210 ignore_flags: GpsInputIgnoreFlags::DEFAULT,
16211 time_week: 0_u16,
16212 gps_id: 0_u8,
16213 fix_type: 0_u8,
16214 satellites_visible: 0_u8,
16215 yaw: 0_u16,
16216 };
16217 #[cfg(feature = "arbitrary")]
16218 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16219 use arbitrary::{Arbitrary, Unstructured};
16220 let mut buf = [0u8; 1024];
16221 rng.fill_bytes(&mut buf);
16222 let mut unstructured = Unstructured::new(&buf);
16223 Self::arbitrary(&mut unstructured).unwrap_or_default()
16224 }
16225}
16226impl Default for GPS_INPUT_DATA {
16227 fn default() -> Self {
16228 Self::DEFAULT.clone()
16229 }
16230}
16231impl MessageData for GPS_INPUT_DATA {
16232 type Message = MavMessage;
16233 const ID: u32 = 232u32;
16234 const NAME: &'static str = "GPS_INPUT";
16235 const EXTRA_CRC: u8 = 151u8;
16236 const ENCODED_LEN: usize = 65usize;
16237 fn deser(
16238 _version: MavlinkVersion,
16239 __input: &[u8],
16240 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16241 let avail_len = __input.len();
16242 let mut payload_buf = [0; Self::ENCODED_LEN];
16243 let mut buf = if avail_len < Self::ENCODED_LEN {
16244 payload_buf[0..avail_len].copy_from_slice(__input);
16245 Bytes::new(&payload_buf)
16246 } else {
16247 Bytes::new(__input)
16248 };
16249 let mut __struct = Self::default();
16250 __struct.time_usec = buf.get_u64_le()?;
16251 __struct.time_week_ms = buf.get_u32_le()?;
16252 __struct.lat = buf.get_i32_le()?;
16253 __struct.lon = buf.get_i32_le()?;
16254 __struct.alt = buf.get_f32_le()?;
16255 __struct.hdop = buf.get_f32_le()?;
16256 __struct.vdop = buf.get_f32_le()?;
16257 __struct.vn = buf.get_f32_le()?;
16258 __struct.ve = buf.get_f32_le()?;
16259 __struct.vd = buf.get_f32_le()?;
16260 __struct.speed_accuracy = buf.get_f32_le()?;
16261 __struct.horiz_accuracy = buf.get_f32_le()?;
16262 __struct.vert_accuracy = buf.get_f32_le()?;
16263 let tmp = buf.get_u16_le()?;
16264 __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
16265 tmp as <GpsInputIgnoreFlags as Flags>::Bits,
16266 )
16267 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16268 flag_type: "GpsInputIgnoreFlags",
16269 value: tmp as u64,
16270 })?;
16271 __struct.time_week = buf.get_u16_le()?;
16272 __struct.gps_id = buf.get_u8()?;
16273 __struct.fix_type = buf.get_u8()?;
16274 __struct.satellites_visible = buf.get_u8()?;
16275 __struct.yaw = buf.get_u16_le()?;
16276 Ok(__struct)
16277 }
16278 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16279 let mut __tmp = BytesMut::new(bytes);
16280 #[allow(clippy::absurd_extreme_comparisons)]
16281 #[allow(unused_comparisons)]
16282 if __tmp.remaining() < Self::ENCODED_LEN {
16283 panic!(
16284 "buffer is too small (need {} bytes, but got {})",
16285 Self::ENCODED_LEN,
16286 __tmp.remaining(),
16287 )
16288 }
16289 __tmp.put_u64_le(self.time_usec);
16290 __tmp.put_u32_le(self.time_week_ms);
16291 __tmp.put_i32_le(self.lat);
16292 __tmp.put_i32_le(self.lon);
16293 __tmp.put_f32_le(self.alt);
16294 __tmp.put_f32_le(self.hdop);
16295 __tmp.put_f32_le(self.vdop);
16296 __tmp.put_f32_le(self.vn);
16297 __tmp.put_f32_le(self.ve);
16298 __tmp.put_f32_le(self.vd);
16299 __tmp.put_f32_le(self.speed_accuracy);
16300 __tmp.put_f32_le(self.horiz_accuracy);
16301 __tmp.put_f32_le(self.vert_accuracy);
16302 __tmp.put_u16_le(self.ignore_flags.bits() as u16);
16303 __tmp.put_u16_le(self.time_week);
16304 __tmp.put_u8(self.gps_id);
16305 __tmp.put_u8(self.fix_type);
16306 __tmp.put_u8(self.satellites_visible);
16307 if matches!(version, MavlinkVersion::V2) {
16308 __tmp.put_u16_le(self.yaw);
16309 let len = __tmp.len();
16310 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16311 } else {
16312 __tmp.len()
16313 }
16314 }
16315}
16316#[doc = "The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16317#[doc = ""]
16318#[doc = "ID: 24"]
16319#[derive(Debug, Clone, PartialEq)]
16320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16322#[cfg_attr(feature = "ts", derive(TS))]
16323#[cfg_attr(feature = "ts", ts(export))]
16324pub struct GPS_RAW_INT_DATA {
16325 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16326 pub time_usec: u64,
16327 #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
16328 pub lat: i32,
16329 #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
16330 pub lon: i32,
16331 #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
16332 pub alt: i32,
16333 #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16334 pub eph: u16,
16335 #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16336 pub epv: u16,
16337 #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16338 pub vel: u16,
16339 #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16340 pub cog: u16,
16341 #[doc = "GPS fix type."]
16342 pub fix_type: GpsFixType,
16343 #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16344 pub satellites_visible: u8,
16345 #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
16346 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16347 pub alt_ellipsoid: i32,
16348 #[doc = "Position uncertainty."]
16349 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16350 pub h_acc: u32,
16351 #[doc = "Altitude uncertainty."]
16352 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16353 pub v_acc: u32,
16354 #[doc = "Speed uncertainty."]
16355 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16356 pub vel_acc: u32,
16357 #[doc = "Heading / track uncertainty"]
16358 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16359 pub hdg_acc: u32,
16360 #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
16361 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16362 pub yaw: u16,
16363}
16364impl GPS_RAW_INT_DATA {
16365 pub const ENCODED_LEN: usize = 52usize;
16366 pub const DEFAULT: Self = Self {
16367 time_usec: 0_u64,
16368 lat: 0_i32,
16369 lon: 0_i32,
16370 alt: 0_i32,
16371 eph: 0_u16,
16372 epv: 0_u16,
16373 vel: 0_u16,
16374 cog: 0_u16,
16375 fix_type: GpsFixType::DEFAULT,
16376 satellites_visible: 0_u8,
16377 alt_ellipsoid: 0_i32,
16378 h_acc: 0_u32,
16379 v_acc: 0_u32,
16380 vel_acc: 0_u32,
16381 hdg_acc: 0_u32,
16382 yaw: 0_u16,
16383 };
16384 #[cfg(feature = "arbitrary")]
16385 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16386 use arbitrary::{Arbitrary, Unstructured};
16387 let mut buf = [0u8; 1024];
16388 rng.fill_bytes(&mut buf);
16389 let mut unstructured = Unstructured::new(&buf);
16390 Self::arbitrary(&mut unstructured).unwrap_or_default()
16391 }
16392}
16393impl Default for GPS_RAW_INT_DATA {
16394 fn default() -> Self {
16395 Self::DEFAULT.clone()
16396 }
16397}
16398impl MessageData for GPS_RAW_INT_DATA {
16399 type Message = MavMessage;
16400 const ID: u32 = 24u32;
16401 const NAME: &'static str = "GPS_RAW_INT";
16402 const EXTRA_CRC: u8 = 24u8;
16403 const ENCODED_LEN: usize = 52usize;
16404 fn deser(
16405 _version: MavlinkVersion,
16406 __input: &[u8],
16407 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16408 let avail_len = __input.len();
16409 let mut payload_buf = [0; Self::ENCODED_LEN];
16410 let mut buf = if avail_len < Self::ENCODED_LEN {
16411 payload_buf[0..avail_len].copy_from_slice(__input);
16412 Bytes::new(&payload_buf)
16413 } else {
16414 Bytes::new(__input)
16415 };
16416 let mut __struct = Self::default();
16417 __struct.time_usec = buf.get_u64_le()?;
16418 __struct.lat = buf.get_i32_le()?;
16419 __struct.lon = buf.get_i32_le()?;
16420 __struct.alt = buf.get_i32_le()?;
16421 __struct.eph = buf.get_u16_le()?;
16422 __struct.epv = buf.get_u16_le()?;
16423 __struct.vel = buf.get_u16_le()?;
16424 __struct.cog = buf.get_u16_le()?;
16425 let tmp = buf.get_u8()?;
16426 __struct.fix_type =
16427 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16428 enum_type: "GpsFixType",
16429 value: tmp as u64,
16430 })?;
16431 __struct.satellites_visible = buf.get_u8()?;
16432 __struct.alt_ellipsoid = buf.get_i32_le()?;
16433 __struct.h_acc = buf.get_u32_le()?;
16434 __struct.v_acc = buf.get_u32_le()?;
16435 __struct.vel_acc = buf.get_u32_le()?;
16436 __struct.hdg_acc = buf.get_u32_le()?;
16437 __struct.yaw = buf.get_u16_le()?;
16438 Ok(__struct)
16439 }
16440 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16441 let mut __tmp = BytesMut::new(bytes);
16442 #[allow(clippy::absurd_extreme_comparisons)]
16443 #[allow(unused_comparisons)]
16444 if __tmp.remaining() < Self::ENCODED_LEN {
16445 panic!(
16446 "buffer is too small (need {} bytes, but got {})",
16447 Self::ENCODED_LEN,
16448 __tmp.remaining(),
16449 )
16450 }
16451 __tmp.put_u64_le(self.time_usec);
16452 __tmp.put_i32_le(self.lat);
16453 __tmp.put_i32_le(self.lon);
16454 __tmp.put_i32_le(self.alt);
16455 __tmp.put_u16_le(self.eph);
16456 __tmp.put_u16_le(self.epv);
16457 __tmp.put_u16_le(self.vel);
16458 __tmp.put_u16_le(self.cog);
16459 __tmp.put_u8(self.fix_type as u8);
16460 __tmp.put_u8(self.satellites_visible);
16461 if matches!(version, MavlinkVersion::V2) {
16462 __tmp.put_i32_le(self.alt_ellipsoid);
16463 __tmp.put_u32_le(self.h_acc);
16464 __tmp.put_u32_le(self.v_acc);
16465 __tmp.put_u32_le(self.vel_acc);
16466 __tmp.put_u32_le(self.hdg_acc);
16467 __tmp.put_u16_le(self.yaw);
16468 let len = __tmp.len();
16469 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16470 } else {
16471 __tmp.len()
16472 }
16473 }
16474}
16475#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
16476#[doc = ""]
16477#[doc = "ID: 233"]
16478#[derive(Debug, Clone, PartialEq)]
16479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16481#[cfg_attr(feature = "ts", derive(TS))]
16482#[cfg_attr(feature = "ts", ts(export))]
16483pub struct GPS_RTCM_DATA_DATA {
16484 #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
16485 pub flags: u8,
16486 #[doc = "data length"]
16487 pub len: u8,
16488 #[doc = "RTCM message (may be fragmented)"]
16489 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16490 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16491 pub data: [u8; 180],
16492}
16493impl GPS_RTCM_DATA_DATA {
16494 pub const ENCODED_LEN: usize = 182usize;
16495 pub const DEFAULT: Self = Self {
16496 flags: 0_u8,
16497 len: 0_u8,
16498 data: [0_u8; 180usize],
16499 };
16500 #[cfg(feature = "arbitrary")]
16501 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16502 use arbitrary::{Arbitrary, Unstructured};
16503 let mut buf = [0u8; 1024];
16504 rng.fill_bytes(&mut buf);
16505 let mut unstructured = Unstructured::new(&buf);
16506 Self::arbitrary(&mut unstructured).unwrap_or_default()
16507 }
16508}
16509impl Default for GPS_RTCM_DATA_DATA {
16510 fn default() -> Self {
16511 Self::DEFAULT.clone()
16512 }
16513}
16514impl MessageData for GPS_RTCM_DATA_DATA {
16515 type Message = MavMessage;
16516 const ID: u32 = 233u32;
16517 const NAME: &'static str = "GPS_RTCM_DATA";
16518 const EXTRA_CRC: u8 = 35u8;
16519 const ENCODED_LEN: usize = 182usize;
16520 fn deser(
16521 _version: MavlinkVersion,
16522 __input: &[u8],
16523 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16524 let avail_len = __input.len();
16525 let mut payload_buf = [0; Self::ENCODED_LEN];
16526 let mut buf = if avail_len < Self::ENCODED_LEN {
16527 payload_buf[0..avail_len].copy_from_slice(__input);
16528 Bytes::new(&payload_buf)
16529 } else {
16530 Bytes::new(__input)
16531 };
16532 let mut __struct = Self::default();
16533 __struct.flags = buf.get_u8()?;
16534 __struct.len = buf.get_u8()?;
16535 for v in &mut __struct.data {
16536 let val = buf.get_u8()?;
16537 *v = val;
16538 }
16539 Ok(__struct)
16540 }
16541 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16542 let mut __tmp = BytesMut::new(bytes);
16543 #[allow(clippy::absurd_extreme_comparisons)]
16544 #[allow(unused_comparisons)]
16545 if __tmp.remaining() < Self::ENCODED_LEN {
16546 panic!(
16547 "buffer is too small (need {} bytes, but got {})",
16548 Self::ENCODED_LEN,
16549 __tmp.remaining(),
16550 )
16551 }
16552 __tmp.put_u8(self.flags);
16553 __tmp.put_u8(self.len);
16554 for val in &self.data {
16555 __tmp.put_u8(*val);
16556 }
16557 if matches!(version, MavlinkVersion::V2) {
16558 let len = __tmp.len();
16559 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16560 } else {
16561 __tmp.len()
16562 }
16563 }
16564}
16565#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
16566#[doc = ""]
16567#[doc = "ID: 127"]
16568#[derive(Debug, Clone, PartialEq)]
16569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16571#[cfg_attr(feature = "ts", derive(TS))]
16572#[cfg_attr(feature = "ts", ts(export))]
16573pub struct GPS_RTK_DATA {
16574 #[doc = "Time since boot of last baseline message received."]
16575 pub time_last_baseline_ms: u32,
16576 #[doc = "GPS Time of Week of last baseline"]
16577 pub tow: u32,
16578 #[doc = "Current baseline in ECEF x or NED north component."]
16579 pub baseline_a_mm: i32,
16580 #[doc = "Current baseline in ECEF y or NED east component."]
16581 pub baseline_b_mm: i32,
16582 #[doc = "Current baseline in ECEF z or NED down component."]
16583 pub baseline_c_mm: i32,
16584 #[doc = "Current estimate of baseline accuracy."]
16585 pub accuracy: u32,
16586 #[doc = "Current number of integer ambiguity hypotheses."]
16587 pub iar_num_hypotheses: i32,
16588 #[doc = "GPS Week Number of last baseline"]
16589 pub wn: u16,
16590 #[doc = "Identification of connected RTK receiver."]
16591 pub rtk_receiver_id: u8,
16592 #[doc = "GPS-specific health report for RTK data."]
16593 pub rtk_health: u8,
16594 #[doc = "Rate of baseline messages being received by GPS"]
16595 pub rtk_rate: u8,
16596 #[doc = "Current number of sats used for RTK calculation."]
16597 pub nsats: u8,
16598 #[doc = "Coordinate system of baseline"]
16599 pub baseline_coords_type: RtkBaselineCoordinateSystem,
16600}
16601impl GPS_RTK_DATA {
16602 pub const ENCODED_LEN: usize = 35usize;
16603 pub const DEFAULT: Self = Self {
16604 time_last_baseline_ms: 0_u32,
16605 tow: 0_u32,
16606 baseline_a_mm: 0_i32,
16607 baseline_b_mm: 0_i32,
16608 baseline_c_mm: 0_i32,
16609 accuracy: 0_u32,
16610 iar_num_hypotheses: 0_i32,
16611 wn: 0_u16,
16612 rtk_receiver_id: 0_u8,
16613 rtk_health: 0_u8,
16614 rtk_rate: 0_u8,
16615 nsats: 0_u8,
16616 baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
16617 };
16618 #[cfg(feature = "arbitrary")]
16619 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16620 use arbitrary::{Arbitrary, Unstructured};
16621 let mut buf = [0u8; 1024];
16622 rng.fill_bytes(&mut buf);
16623 let mut unstructured = Unstructured::new(&buf);
16624 Self::arbitrary(&mut unstructured).unwrap_or_default()
16625 }
16626}
16627impl Default for GPS_RTK_DATA {
16628 fn default() -> Self {
16629 Self::DEFAULT.clone()
16630 }
16631}
16632impl MessageData for GPS_RTK_DATA {
16633 type Message = MavMessage;
16634 const ID: u32 = 127u32;
16635 const NAME: &'static str = "GPS_RTK";
16636 const EXTRA_CRC: u8 = 25u8;
16637 const ENCODED_LEN: usize = 35usize;
16638 fn deser(
16639 _version: MavlinkVersion,
16640 __input: &[u8],
16641 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16642 let avail_len = __input.len();
16643 let mut payload_buf = [0; Self::ENCODED_LEN];
16644 let mut buf = if avail_len < Self::ENCODED_LEN {
16645 payload_buf[0..avail_len].copy_from_slice(__input);
16646 Bytes::new(&payload_buf)
16647 } else {
16648 Bytes::new(__input)
16649 };
16650 let mut __struct = Self::default();
16651 __struct.time_last_baseline_ms = buf.get_u32_le()?;
16652 __struct.tow = buf.get_u32_le()?;
16653 __struct.baseline_a_mm = buf.get_i32_le()?;
16654 __struct.baseline_b_mm = buf.get_i32_le()?;
16655 __struct.baseline_c_mm = buf.get_i32_le()?;
16656 __struct.accuracy = buf.get_u32_le()?;
16657 __struct.iar_num_hypotheses = buf.get_i32_le()?;
16658 __struct.wn = buf.get_u16_le()?;
16659 __struct.rtk_receiver_id = buf.get_u8()?;
16660 __struct.rtk_health = buf.get_u8()?;
16661 __struct.rtk_rate = buf.get_u8()?;
16662 __struct.nsats = buf.get_u8()?;
16663 let tmp = buf.get_u8()?;
16664 __struct.baseline_coords_type =
16665 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16666 enum_type: "RtkBaselineCoordinateSystem",
16667 value: tmp as u64,
16668 })?;
16669 Ok(__struct)
16670 }
16671 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16672 let mut __tmp = BytesMut::new(bytes);
16673 #[allow(clippy::absurd_extreme_comparisons)]
16674 #[allow(unused_comparisons)]
16675 if __tmp.remaining() < Self::ENCODED_LEN {
16676 panic!(
16677 "buffer is too small (need {} bytes, but got {})",
16678 Self::ENCODED_LEN,
16679 __tmp.remaining(),
16680 )
16681 }
16682 __tmp.put_u32_le(self.time_last_baseline_ms);
16683 __tmp.put_u32_le(self.tow);
16684 __tmp.put_i32_le(self.baseline_a_mm);
16685 __tmp.put_i32_le(self.baseline_b_mm);
16686 __tmp.put_i32_le(self.baseline_c_mm);
16687 __tmp.put_u32_le(self.accuracy);
16688 __tmp.put_i32_le(self.iar_num_hypotheses);
16689 __tmp.put_u16_le(self.wn);
16690 __tmp.put_u8(self.rtk_receiver_id);
16691 __tmp.put_u8(self.rtk_health);
16692 __tmp.put_u8(self.rtk_rate);
16693 __tmp.put_u8(self.nsats);
16694 __tmp.put_u8(self.baseline_coords_type as u8);
16695 if matches!(version, MavlinkVersion::V2) {
16696 let len = __tmp.len();
16697 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16698 } else {
16699 __tmp.len()
16700 }
16701 }
16702}
16703#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
16704#[doc = ""]
16705#[doc = "ID: 25"]
16706#[derive(Debug, Clone, PartialEq)]
16707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16709#[cfg_attr(feature = "ts", derive(TS))]
16710#[cfg_attr(feature = "ts", ts(export))]
16711pub struct GPS_STATUS_DATA {
16712 #[doc = "Number of satellites visible"]
16713 pub satellites_visible: u8,
16714 #[doc = "Global satellite ID"]
16715 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16716 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16717 pub satellite_prn: [u8; 20],
16718 #[doc = "0: Satellite not used, 1: used for localization"]
16719 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16720 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16721 pub satellite_used: [u8; 20],
16722 #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
16723 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16724 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16725 pub satellite_elevation: [u8; 20],
16726 #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
16727 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16728 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16729 pub satellite_azimuth: [u8; 20],
16730 #[doc = "Signal to noise ratio of satellite"]
16731 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16732 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16733 pub satellite_snr: [u8; 20],
16734}
16735impl GPS_STATUS_DATA {
16736 pub const ENCODED_LEN: usize = 101usize;
16737 pub const DEFAULT: Self = Self {
16738 satellites_visible: 0_u8,
16739 satellite_prn: [0_u8; 20usize],
16740 satellite_used: [0_u8; 20usize],
16741 satellite_elevation: [0_u8; 20usize],
16742 satellite_azimuth: [0_u8; 20usize],
16743 satellite_snr: [0_u8; 20usize],
16744 };
16745 #[cfg(feature = "arbitrary")]
16746 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16747 use arbitrary::{Arbitrary, Unstructured};
16748 let mut buf = [0u8; 1024];
16749 rng.fill_bytes(&mut buf);
16750 let mut unstructured = Unstructured::new(&buf);
16751 Self::arbitrary(&mut unstructured).unwrap_or_default()
16752 }
16753}
16754impl Default for GPS_STATUS_DATA {
16755 fn default() -> Self {
16756 Self::DEFAULT.clone()
16757 }
16758}
16759impl MessageData for GPS_STATUS_DATA {
16760 type Message = MavMessage;
16761 const ID: u32 = 25u32;
16762 const NAME: &'static str = "GPS_STATUS";
16763 const EXTRA_CRC: u8 = 23u8;
16764 const ENCODED_LEN: usize = 101usize;
16765 fn deser(
16766 _version: MavlinkVersion,
16767 __input: &[u8],
16768 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16769 let avail_len = __input.len();
16770 let mut payload_buf = [0; Self::ENCODED_LEN];
16771 let mut buf = if avail_len < Self::ENCODED_LEN {
16772 payload_buf[0..avail_len].copy_from_slice(__input);
16773 Bytes::new(&payload_buf)
16774 } else {
16775 Bytes::new(__input)
16776 };
16777 let mut __struct = Self::default();
16778 __struct.satellites_visible = buf.get_u8()?;
16779 for v in &mut __struct.satellite_prn {
16780 let val = buf.get_u8()?;
16781 *v = val;
16782 }
16783 for v in &mut __struct.satellite_used {
16784 let val = buf.get_u8()?;
16785 *v = val;
16786 }
16787 for v in &mut __struct.satellite_elevation {
16788 let val = buf.get_u8()?;
16789 *v = val;
16790 }
16791 for v in &mut __struct.satellite_azimuth {
16792 let val = buf.get_u8()?;
16793 *v = val;
16794 }
16795 for v in &mut __struct.satellite_snr {
16796 let val = buf.get_u8()?;
16797 *v = val;
16798 }
16799 Ok(__struct)
16800 }
16801 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16802 let mut __tmp = BytesMut::new(bytes);
16803 #[allow(clippy::absurd_extreme_comparisons)]
16804 #[allow(unused_comparisons)]
16805 if __tmp.remaining() < Self::ENCODED_LEN {
16806 panic!(
16807 "buffer is too small (need {} bytes, but got {})",
16808 Self::ENCODED_LEN,
16809 __tmp.remaining(),
16810 )
16811 }
16812 __tmp.put_u8(self.satellites_visible);
16813 for val in &self.satellite_prn {
16814 __tmp.put_u8(*val);
16815 }
16816 for val in &self.satellite_used {
16817 __tmp.put_u8(*val);
16818 }
16819 for val in &self.satellite_elevation {
16820 __tmp.put_u8(*val);
16821 }
16822 for val in &self.satellite_azimuth {
16823 __tmp.put_u8(*val);
16824 }
16825 for val in &self.satellite_snr {
16826 __tmp.put_u8(*val);
16827 }
16828 if matches!(version, MavlinkVersion::V2) {
16829 let len = __tmp.len();
16830 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16831 } else {
16832 __tmp.len()
16833 }
16834 }
16835}
16836#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
16837#[doc = ""]
16838#[doc = "ID: 0"]
16839#[derive(Debug, Clone, PartialEq)]
16840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16842#[cfg_attr(feature = "ts", derive(TS))]
16843#[cfg_attr(feature = "ts", ts(export))]
16844pub struct HEARTBEAT_DATA {
16845 #[doc = "A bitfield for use for autopilot-specific flags"]
16846 pub custom_mode: u32,
16847 #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
16848 pub mavtype: MavType,
16849 #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16850 pub autopilot: MavAutopilot,
16851 #[doc = "System mode bitmap."]
16852 pub base_mode: MavModeFlag,
16853 #[doc = "System status flag."]
16854 pub system_status: MavState,
16855 #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
16856 pub mavlink_version: u8,
16857}
16858impl HEARTBEAT_DATA {
16859 pub const ENCODED_LEN: usize = 9usize;
16860 pub const DEFAULT: Self = Self {
16861 custom_mode: 0_u32,
16862 mavtype: MavType::DEFAULT,
16863 autopilot: MavAutopilot::DEFAULT,
16864 base_mode: MavModeFlag::DEFAULT,
16865 system_status: MavState::DEFAULT,
16866 mavlink_version: MINOR_MAVLINK_VERSION,
16867 };
16868 #[cfg(feature = "arbitrary")]
16869 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16870 use arbitrary::{Arbitrary, Unstructured};
16871 let mut buf = [0u8; 1024];
16872 rng.fill_bytes(&mut buf);
16873 let mut unstructured = Unstructured::new(&buf);
16874 Self::arbitrary(&mut unstructured).unwrap_or_default()
16875 }
16876}
16877impl Default for HEARTBEAT_DATA {
16878 fn default() -> Self {
16879 Self::DEFAULT.clone()
16880 }
16881}
16882impl MessageData for HEARTBEAT_DATA {
16883 type Message = MavMessage;
16884 const ID: u32 = 0u32;
16885 const NAME: &'static str = "HEARTBEAT";
16886 const EXTRA_CRC: u8 = 50u8;
16887 const ENCODED_LEN: usize = 9usize;
16888 fn deser(
16889 _version: MavlinkVersion,
16890 __input: &[u8],
16891 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16892 let avail_len = __input.len();
16893 let mut payload_buf = [0; Self::ENCODED_LEN];
16894 let mut buf = if avail_len < Self::ENCODED_LEN {
16895 payload_buf[0..avail_len].copy_from_slice(__input);
16896 Bytes::new(&payload_buf)
16897 } else {
16898 Bytes::new(__input)
16899 };
16900 let mut __struct = Self::default();
16901 __struct.custom_mode = buf.get_u32_le()?;
16902 let tmp = buf.get_u8()?;
16903 __struct.mavtype =
16904 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16905 enum_type: "MavType",
16906 value: tmp as u64,
16907 })?;
16908 let tmp = buf.get_u8()?;
16909 __struct.autopilot =
16910 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16911 enum_type: "MavAutopilot",
16912 value: tmp as u64,
16913 })?;
16914 let tmp = buf.get_u8()?;
16915 __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16916 ::mavlink_core::error::ParserError::InvalidFlag {
16917 flag_type: "MavModeFlag",
16918 value: tmp as u64,
16919 },
16920 )?;
16921 let tmp = buf.get_u8()?;
16922 __struct.system_status =
16923 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16924 enum_type: "MavState",
16925 value: tmp as u64,
16926 })?;
16927 __struct.mavlink_version = buf.get_u8()?;
16928 Ok(__struct)
16929 }
16930 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16931 let mut __tmp = BytesMut::new(bytes);
16932 #[allow(clippy::absurd_extreme_comparisons)]
16933 #[allow(unused_comparisons)]
16934 if __tmp.remaining() < Self::ENCODED_LEN {
16935 panic!(
16936 "buffer is too small (need {} bytes, but got {})",
16937 Self::ENCODED_LEN,
16938 __tmp.remaining(),
16939 )
16940 }
16941 __tmp.put_u32_le(self.custom_mode);
16942 __tmp.put_u8(self.mavtype as u8);
16943 __tmp.put_u8(self.autopilot as u8);
16944 __tmp.put_u8(self.base_mode.bits() as u8);
16945 __tmp.put_u8(self.system_status as u8);
16946 __tmp.put_u8(self.mavlink_version);
16947 if matches!(version, MavlinkVersion::V2) {
16948 let len = __tmp.len();
16949 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16950 } else {
16951 __tmp.len()
16952 }
16953 }
16954}
16955#[doc = "Herelink Telemetry."]
16956#[doc = ""]
16957#[doc = "ID: 50003"]
16958#[derive(Debug, Clone, PartialEq)]
16959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16961#[cfg_attr(feature = "ts", derive(TS))]
16962#[cfg_attr(feature = "ts", ts(export))]
16963pub struct HERELINK_TELEM_DATA {
16964 pub rf_freq: u32,
16965 pub link_bw: u32,
16966 pub link_rate: u32,
16967 pub snr: i16,
16968 pub cpu_temp: i16,
16969 pub board_temp: i16,
16970 pub rssi: u8,
16971}
16972impl HERELINK_TELEM_DATA {
16973 pub const ENCODED_LEN: usize = 19usize;
16974 pub const DEFAULT: Self = Self {
16975 rf_freq: 0_u32,
16976 link_bw: 0_u32,
16977 link_rate: 0_u32,
16978 snr: 0_i16,
16979 cpu_temp: 0_i16,
16980 board_temp: 0_i16,
16981 rssi: 0_u8,
16982 };
16983 #[cfg(feature = "arbitrary")]
16984 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16985 use arbitrary::{Arbitrary, Unstructured};
16986 let mut buf = [0u8; 1024];
16987 rng.fill_bytes(&mut buf);
16988 let mut unstructured = Unstructured::new(&buf);
16989 Self::arbitrary(&mut unstructured).unwrap_or_default()
16990 }
16991}
16992impl Default for HERELINK_TELEM_DATA {
16993 fn default() -> Self {
16994 Self::DEFAULT.clone()
16995 }
16996}
16997impl MessageData for HERELINK_TELEM_DATA {
16998 type Message = MavMessage;
16999 const ID: u32 = 50003u32;
17000 const NAME: &'static str = "HERELINK_TELEM";
17001 const EXTRA_CRC: u8 = 62u8;
17002 const ENCODED_LEN: usize = 19usize;
17003 fn deser(
17004 _version: MavlinkVersion,
17005 __input: &[u8],
17006 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17007 let avail_len = __input.len();
17008 let mut payload_buf = [0; Self::ENCODED_LEN];
17009 let mut buf = if avail_len < Self::ENCODED_LEN {
17010 payload_buf[0..avail_len].copy_from_slice(__input);
17011 Bytes::new(&payload_buf)
17012 } else {
17013 Bytes::new(__input)
17014 };
17015 let mut __struct = Self::default();
17016 __struct.rf_freq = buf.get_u32_le()?;
17017 __struct.link_bw = buf.get_u32_le()?;
17018 __struct.link_rate = buf.get_u32_le()?;
17019 __struct.snr = buf.get_i16_le()?;
17020 __struct.cpu_temp = buf.get_i16_le()?;
17021 __struct.board_temp = buf.get_i16_le()?;
17022 __struct.rssi = buf.get_u8()?;
17023 Ok(__struct)
17024 }
17025 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17026 let mut __tmp = BytesMut::new(bytes);
17027 #[allow(clippy::absurd_extreme_comparisons)]
17028 #[allow(unused_comparisons)]
17029 if __tmp.remaining() < Self::ENCODED_LEN {
17030 panic!(
17031 "buffer is too small (need {} bytes, but got {})",
17032 Self::ENCODED_LEN,
17033 __tmp.remaining(),
17034 )
17035 }
17036 __tmp.put_u32_le(self.rf_freq);
17037 __tmp.put_u32_le(self.link_bw);
17038 __tmp.put_u32_le(self.link_rate);
17039 __tmp.put_i16_le(self.snr);
17040 __tmp.put_i16_le(self.cpu_temp);
17041 __tmp.put_i16_le(self.board_temp);
17042 __tmp.put_u8(self.rssi);
17043 if matches!(version, MavlinkVersion::V2) {
17044 let len = __tmp.len();
17045 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17046 } else {
17047 __tmp.len()
17048 }
17049 }
17050}
17051#[doc = "Information about video stream."]
17052#[doc = ""]
17053#[doc = "ID: 50002"]
17054#[derive(Debug, Clone, PartialEq)]
17055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17057#[cfg_attr(feature = "ts", derive(TS))]
17058#[cfg_attr(feature = "ts", ts(export))]
17059pub struct HERELINK_VIDEO_STREAM_INFORMATION_DATA {
17060 #[doc = "Frame rate."]
17061 pub framerate: f32,
17062 #[doc = "Bit rate."]
17063 pub bitrate: u32,
17064 #[doc = "Horizontal resolution."]
17065 pub resolution_h: u16,
17066 #[doc = "Vertical resolution."]
17067 pub resolution_v: u16,
17068 #[doc = "Video image rotation clockwise."]
17069 pub rotation: u16,
17070 #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
17071 pub camera_id: u8,
17072 #[doc = "Number of streams available."]
17073 pub status: u8,
17074 #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
17075 #[cfg_attr(feature = "ts", ts(type = "string"))]
17076 pub uri: CharArray<230>,
17077}
17078impl HERELINK_VIDEO_STREAM_INFORMATION_DATA {
17079 pub const ENCODED_LEN: usize = 246usize;
17080 pub const DEFAULT: Self = Self {
17081 framerate: 0.0_f32,
17082 bitrate: 0_u32,
17083 resolution_h: 0_u16,
17084 resolution_v: 0_u16,
17085 rotation: 0_u16,
17086 camera_id: 0_u8,
17087 status: 0_u8,
17088 uri: CharArray::new([0_u8; 230usize]),
17089 };
17090 #[cfg(feature = "arbitrary")]
17091 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17092 use arbitrary::{Arbitrary, Unstructured};
17093 let mut buf = [0u8; 1024];
17094 rng.fill_bytes(&mut buf);
17095 let mut unstructured = Unstructured::new(&buf);
17096 Self::arbitrary(&mut unstructured).unwrap_or_default()
17097 }
17098}
17099impl Default for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
17100 fn default() -> Self {
17101 Self::DEFAULT.clone()
17102 }
17103}
17104impl MessageData for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
17105 type Message = MavMessage;
17106 const ID: u32 = 50002u32;
17107 const NAME: &'static str = "HERELINK_VIDEO_STREAM_INFORMATION";
17108 const EXTRA_CRC: u8 = 181u8;
17109 const ENCODED_LEN: usize = 246usize;
17110 fn deser(
17111 _version: MavlinkVersion,
17112 __input: &[u8],
17113 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17114 let avail_len = __input.len();
17115 let mut payload_buf = [0; Self::ENCODED_LEN];
17116 let mut buf = if avail_len < Self::ENCODED_LEN {
17117 payload_buf[0..avail_len].copy_from_slice(__input);
17118 Bytes::new(&payload_buf)
17119 } else {
17120 Bytes::new(__input)
17121 };
17122 let mut __struct = Self::default();
17123 __struct.framerate = buf.get_f32_le()?;
17124 __struct.bitrate = buf.get_u32_le()?;
17125 __struct.resolution_h = buf.get_u16_le()?;
17126 __struct.resolution_v = buf.get_u16_le()?;
17127 __struct.rotation = buf.get_u16_le()?;
17128 __struct.camera_id = buf.get_u8()?;
17129 __struct.status = buf.get_u8()?;
17130 let mut tmp = [0_u8; 230usize];
17131 for v in &mut tmp {
17132 *v = buf.get_u8()?;
17133 }
17134 __struct.uri = CharArray::new(tmp);
17135 Ok(__struct)
17136 }
17137 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17138 let mut __tmp = BytesMut::new(bytes);
17139 #[allow(clippy::absurd_extreme_comparisons)]
17140 #[allow(unused_comparisons)]
17141 if __tmp.remaining() < Self::ENCODED_LEN {
17142 panic!(
17143 "buffer is too small (need {} bytes, but got {})",
17144 Self::ENCODED_LEN,
17145 __tmp.remaining(),
17146 )
17147 }
17148 __tmp.put_f32_le(self.framerate);
17149 __tmp.put_u32_le(self.bitrate);
17150 __tmp.put_u16_le(self.resolution_h);
17151 __tmp.put_u16_le(self.resolution_v);
17152 __tmp.put_u16_le(self.rotation);
17153 __tmp.put_u8(self.camera_id);
17154 __tmp.put_u8(self.status);
17155 for val in &self.uri {
17156 __tmp.put_u8(*val);
17157 }
17158 if matches!(version, MavlinkVersion::V2) {
17159 let len = __tmp.len();
17160 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17161 } else {
17162 __tmp.len()
17163 }
17164 }
17165}
17166#[doc = "The IMU readings in SI units in NED body frame."]
17167#[doc = ""]
17168#[doc = "ID: 105"]
17169#[derive(Debug, Clone, PartialEq)]
17170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17172#[cfg_attr(feature = "ts", derive(TS))]
17173#[cfg_attr(feature = "ts", ts(export))]
17174pub struct HIGHRES_IMU_DATA {
17175 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17176 pub time_usec: u64,
17177 #[doc = "X acceleration"]
17178 pub xacc: f32,
17179 #[doc = "Y acceleration"]
17180 pub yacc: f32,
17181 #[doc = "Z acceleration"]
17182 pub zacc: f32,
17183 #[doc = "Angular speed around X axis"]
17184 pub xgyro: f32,
17185 #[doc = "Angular speed around Y axis"]
17186 pub ygyro: f32,
17187 #[doc = "Angular speed around Z axis"]
17188 pub zgyro: f32,
17189 #[doc = "X Magnetic field"]
17190 pub xmag: f32,
17191 #[doc = "Y Magnetic field"]
17192 pub ymag: f32,
17193 #[doc = "Z Magnetic field"]
17194 pub zmag: f32,
17195 #[doc = "Absolute pressure"]
17196 pub abs_pressure: f32,
17197 #[doc = "Differential pressure"]
17198 pub diff_pressure: f32,
17199 #[doc = "Altitude calculated from pressure"]
17200 pub pressure_alt: f32,
17201 #[doc = "Temperature"]
17202 pub temperature: f32,
17203 #[doc = "Bitmap for fields that have updated since last message"]
17204 pub fields_updated: HighresImuUpdatedFlags,
17205 #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
17206 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17207 pub id: u8,
17208}
17209impl HIGHRES_IMU_DATA {
17210 pub const ENCODED_LEN: usize = 63usize;
17211 pub const DEFAULT: Self = Self {
17212 time_usec: 0_u64,
17213 xacc: 0.0_f32,
17214 yacc: 0.0_f32,
17215 zacc: 0.0_f32,
17216 xgyro: 0.0_f32,
17217 ygyro: 0.0_f32,
17218 zgyro: 0.0_f32,
17219 xmag: 0.0_f32,
17220 ymag: 0.0_f32,
17221 zmag: 0.0_f32,
17222 abs_pressure: 0.0_f32,
17223 diff_pressure: 0.0_f32,
17224 pressure_alt: 0.0_f32,
17225 temperature: 0.0_f32,
17226 fields_updated: HighresImuUpdatedFlags::DEFAULT,
17227 id: 0_u8,
17228 };
17229 #[cfg(feature = "arbitrary")]
17230 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17231 use arbitrary::{Arbitrary, Unstructured};
17232 let mut buf = [0u8; 1024];
17233 rng.fill_bytes(&mut buf);
17234 let mut unstructured = Unstructured::new(&buf);
17235 Self::arbitrary(&mut unstructured).unwrap_or_default()
17236 }
17237}
17238impl Default for HIGHRES_IMU_DATA {
17239 fn default() -> Self {
17240 Self::DEFAULT.clone()
17241 }
17242}
17243impl MessageData for HIGHRES_IMU_DATA {
17244 type Message = MavMessage;
17245 const ID: u32 = 105u32;
17246 const NAME: &'static str = "HIGHRES_IMU";
17247 const EXTRA_CRC: u8 = 93u8;
17248 const ENCODED_LEN: usize = 63usize;
17249 fn deser(
17250 _version: MavlinkVersion,
17251 __input: &[u8],
17252 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17253 let avail_len = __input.len();
17254 let mut payload_buf = [0; Self::ENCODED_LEN];
17255 let mut buf = if avail_len < Self::ENCODED_LEN {
17256 payload_buf[0..avail_len].copy_from_slice(__input);
17257 Bytes::new(&payload_buf)
17258 } else {
17259 Bytes::new(__input)
17260 };
17261 let mut __struct = Self::default();
17262 __struct.time_usec = buf.get_u64_le()?;
17263 __struct.xacc = buf.get_f32_le()?;
17264 __struct.yacc = buf.get_f32_le()?;
17265 __struct.zacc = buf.get_f32_le()?;
17266 __struct.xgyro = buf.get_f32_le()?;
17267 __struct.ygyro = buf.get_f32_le()?;
17268 __struct.zgyro = buf.get_f32_le()?;
17269 __struct.xmag = buf.get_f32_le()?;
17270 __struct.ymag = buf.get_f32_le()?;
17271 __struct.zmag = buf.get_f32_le()?;
17272 __struct.abs_pressure = buf.get_f32_le()?;
17273 __struct.diff_pressure = buf.get_f32_le()?;
17274 __struct.pressure_alt = buf.get_f32_le()?;
17275 __struct.temperature = buf.get_f32_le()?;
17276 let tmp = buf.get_u16_le()?;
17277 __struct.fields_updated =
17278 HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
17279 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17280 flag_type: "HighresImuUpdatedFlags",
17281 value: tmp as u64,
17282 })?;
17283 __struct.id = buf.get_u8()?;
17284 Ok(__struct)
17285 }
17286 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17287 let mut __tmp = BytesMut::new(bytes);
17288 #[allow(clippy::absurd_extreme_comparisons)]
17289 #[allow(unused_comparisons)]
17290 if __tmp.remaining() < Self::ENCODED_LEN {
17291 panic!(
17292 "buffer is too small (need {} bytes, but got {})",
17293 Self::ENCODED_LEN,
17294 __tmp.remaining(),
17295 )
17296 }
17297 __tmp.put_u64_le(self.time_usec);
17298 __tmp.put_f32_le(self.xacc);
17299 __tmp.put_f32_le(self.yacc);
17300 __tmp.put_f32_le(self.zacc);
17301 __tmp.put_f32_le(self.xgyro);
17302 __tmp.put_f32_le(self.ygyro);
17303 __tmp.put_f32_le(self.zgyro);
17304 __tmp.put_f32_le(self.xmag);
17305 __tmp.put_f32_le(self.ymag);
17306 __tmp.put_f32_le(self.zmag);
17307 __tmp.put_f32_le(self.abs_pressure);
17308 __tmp.put_f32_le(self.diff_pressure);
17309 __tmp.put_f32_le(self.pressure_alt);
17310 __tmp.put_f32_le(self.temperature);
17311 __tmp.put_u16_le(self.fields_updated.bits() as u16);
17312 if matches!(version, MavlinkVersion::V2) {
17313 __tmp.put_u8(self.id);
17314 let len = __tmp.len();
17315 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17316 } else {
17317 __tmp.len()
17318 }
17319 }
17320}
17321#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
17322#[doc = "Message appropriate for high latency connections like Iridium."]
17323#[doc = ""]
17324#[doc = "ID: 234"]
17325#[derive(Debug, Clone, PartialEq)]
17326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17328#[cfg_attr(feature = "ts", derive(TS))]
17329#[cfg_attr(feature = "ts", ts(export))]
17330pub struct HIGH_LATENCY_DATA {
17331 #[doc = "A bitfield for use for autopilot-specific flags."]
17332 pub custom_mode: u32,
17333 #[doc = "Latitude"]
17334 pub latitude: i32,
17335 #[doc = "Longitude"]
17336 pub longitude: i32,
17337 #[doc = "roll"]
17338 pub roll: i16,
17339 #[doc = "pitch"]
17340 pub pitch: i16,
17341 #[doc = "heading"]
17342 pub heading: u16,
17343 #[doc = "heading setpoint"]
17344 pub heading_sp: i16,
17345 #[doc = "Altitude above mean sea level"]
17346 pub altitude_amsl: i16,
17347 #[doc = "Altitude setpoint relative to the home position"]
17348 pub altitude_sp: i16,
17349 #[doc = "distance to target"]
17350 pub wp_distance: u16,
17351 #[doc = "Bitmap of enabled system modes."]
17352 pub base_mode: MavModeFlag,
17353 #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
17354 pub landed_state: MavLandedState,
17355 #[doc = "throttle (percentage)"]
17356 pub throttle: i8,
17357 #[doc = "airspeed"]
17358 pub airspeed: u8,
17359 #[doc = "airspeed setpoint"]
17360 pub airspeed_sp: u8,
17361 #[doc = "groundspeed"]
17362 pub groundspeed: u8,
17363 #[doc = "climb rate"]
17364 pub climb_rate: i8,
17365 #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
17366 pub gps_nsat: u8,
17367 #[doc = "GPS Fix type."]
17368 pub gps_fix_type: GpsFixType,
17369 #[doc = "Remaining battery (percentage)"]
17370 pub battery_remaining: u8,
17371 #[doc = "Autopilot temperature (degrees C)"]
17372 pub temperature: i8,
17373 #[doc = "Air temperature (degrees C) from airspeed sensor"]
17374 pub temperature_air: i8,
17375 #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
17376 pub failsafe: u8,
17377 #[doc = "current waypoint number"]
17378 pub wp_num: u8,
17379}
17380impl HIGH_LATENCY_DATA {
17381 pub const ENCODED_LEN: usize = 40usize;
17382 pub const DEFAULT: Self = Self {
17383 custom_mode: 0_u32,
17384 latitude: 0_i32,
17385 longitude: 0_i32,
17386 roll: 0_i16,
17387 pitch: 0_i16,
17388 heading: 0_u16,
17389 heading_sp: 0_i16,
17390 altitude_amsl: 0_i16,
17391 altitude_sp: 0_i16,
17392 wp_distance: 0_u16,
17393 base_mode: MavModeFlag::DEFAULT,
17394 landed_state: MavLandedState::DEFAULT,
17395 throttle: 0_i8,
17396 airspeed: 0_u8,
17397 airspeed_sp: 0_u8,
17398 groundspeed: 0_u8,
17399 climb_rate: 0_i8,
17400 gps_nsat: 0_u8,
17401 gps_fix_type: GpsFixType::DEFAULT,
17402 battery_remaining: 0_u8,
17403 temperature: 0_i8,
17404 temperature_air: 0_i8,
17405 failsafe: 0_u8,
17406 wp_num: 0_u8,
17407 };
17408 #[cfg(feature = "arbitrary")]
17409 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17410 use arbitrary::{Arbitrary, Unstructured};
17411 let mut buf = [0u8; 1024];
17412 rng.fill_bytes(&mut buf);
17413 let mut unstructured = Unstructured::new(&buf);
17414 Self::arbitrary(&mut unstructured).unwrap_or_default()
17415 }
17416}
17417impl Default for HIGH_LATENCY_DATA {
17418 fn default() -> Self {
17419 Self::DEFAULT.clone()
17420 }
17421}
17422impl MessageData for HIGH_LATENCY_DATA {
17423 type Message = MavMessage;
17424 const ID: u32 = 234u32;
17425 const NAME: &'static str = "HIGH_LATENCY";
17426 const EXTRA_CRC: u8 = 150u8;
17427 const ENCODED_LEN: usize = 40usize;
17428 fn deser(
17429 _version: MavlinkVersion,
17430 __input: &[u8],
17431 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17432 let avail_len = __input.len();
17433 let mut payload_buf = [0; Self::ENCODED_LEN];
17434 let mut buf = if avail_len < Self::ENCODED_LEN {
17435 payload_buf[0..avail_len].copy_from_slice(__input);
17436 Bytes::new(&payload_buf)
17437 } else {
17438 Bytes::new(__input)
17439 };
17440 let mut __struct = Self::default();
17441 __struct.custom_mode = buf.get_u32_le()?;
17442 __struct.latitude = buf.get_i32_le()?;
17443 __struct.longitude = buf.get_i32_le()?;
17444 __struct.roll = buf.get_i16_le()?;
17445 __struct.pitch = buf.get_i16_le()?;
17446 __struct.heading = buf.get_u16_le()?;
17447 __struct.heading_sp = buf.get_i16_le()?;
17448 __struct.altitude_amsl = buf.get_i16_le()?;
17449 __struct.altitude_sp = buf.get_i16_le()?;
17450 __struct.wp_distance = buf.get_u16_le()?;
17451 let tmp = buf.get_u8()?;
17452 __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
17453 ::mavlink_core::error::ParserError::InvalidFlag {
17454 flag_type: "MavModeFlag",
17455 value: tmp as u64,
17456 },
17457 )?;
17458 let tmp = buf.get_u8()?;
17459 __struct.landed_state =
17460 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17461 enum_type: "MavLandedState",
17462 value: tmp as u64,
17463 })?;
17464 __struct.throttle = buf.get_i8()?;
17465 __struct.airspeed = buf.get_u8()?;
17466 __struct.airspeed_sp = buf.get_u8()?;
17467 __struct.groundspeed = buf.get_u8()?;
17468 __struct.climb_rate = buf.get_i8()?;
17469 __struct.gps_nsat = buf.get_u8()?;
17470 let tmp = buf.get_u8()?;
17471 __struct.gps_fix_type =
17472 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17473 enum_type: "GpsFixType",
17474 value: tmp as u64,
17475 })?;
17476 __struct.battery_remaining = buf.get_u8()?;
17477 __struct.temperature = buf.get_i8()?;
17478 __struct.temperature_air = buf.get_i8()?;
17479 __struct.failsafe = buf.get_u8()?;
17480 __struct.wp_num = buf.get_u8()?;
17481 Ok(__struct)
17482 }
17483 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17484 let mut __tmp = BytesMut::new(bytes);
17485 #[allow(clippy::absurd_extreme_comparisons)]
17486 #[allow(unused_comparisons)]
17487 if __tmp.remaining() < Self::ENCODED_LEN {
17488 panic!(
17489 "buffer is too small (need {} bytes, but got {})",
17490 Self::ENCODED_LEN,
17491 __tmp.remaining(),
17492 )
17493 }
17494 __tmp.put_u32_le(self.custom_mode);
17495 __tmp.put_i32_le(self.latitude);
17496 __tmp.put_i32_le(self.longitude);
17497 __tmp.put_i16_le(self.roll);
17498 __tmp.put_i16_le(self.pitch);
17499 __tmp.put_u16_le(self.heading);
17500 __tmp.put_i16_le(self.heading_sp);
17501 __tmp.put_i16_le(self.altitude_amsl);
17502 __tmp.put_i16_le(self.altitude_sp);
17503 __tmp.put_u16_le(self.wp_distance);
17504 __tmp.put_u8(self.base_mode.bits() as u8);
17505 __tmp.put_u8(self.landed_state as u8);
17506 __tmp.put_i8(self.throttle);
17507 __tmp.put_u8(self.airspeed);
17508 __tmp.put_u8(self.airspeed_sp);
17509 __tmp.put_u8(self.groundspeed);
17510 __tmp.put_i8(self.climb_rate);
17511 __tmp.put_u8(self.gps_nsat);
17512 __tmp.put_u8(self.gps_fix_type as u8);
17513 __tmp.put_u8(self.battery_remaining);
17514 __tmp.put_i8(self.temperature);
17515 __tmp.put_i8(self.temperature_air);
17516 __tmp.put_u8(self.failsafe);
17517 __tmp.put_u8(self.wp_num);
17518 if matches!(version, MavlinkVersion::V2) {
17519 let len = __tmp.len();
17520 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17521 } else {
17522 __tmp.len()
17523 }
17524 }
17525}
17526#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
17527#[doc = ""]
17528#[doc = "ID: 235"]
17529#[derive(Debug, Clone, PartialEq)]
17530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17532#[cfg_attr(feature = "ts", derive(TS))]
17533#[cfg_attr(feature = "ts", ts(export))]
17534pub struct HIGH_LATENCY2_DATA {
17535 #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
17536 pub timestamp: u32,
17537 #[doc = "Latitude"]
17538 pub latitude: i32,
17539 #[doc = "Longitude"]
17540 pub longitude: i32,
17541 #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
17542 pub custom_mode: u16,
17543 #[doc = "Altitude above mean sea level"]
17544 pub altitude: i16,
17545 #[doc = "Altitude setpoint"]
17546 pub target_altitude: i16,
17547 #[doc = "Distance to target waypoint or position"]
17548 pub target_distance: u16,
17549 #[doc = "Current waypoint number"]
17550 pub wp_num: u16,
17551 #[doc = "Bitmap of failure flags."]
17552 pub failure_flags: HlFailureFlag,
17553 #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
17554 pub mavtype: MavType,
17555 #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
17556 pub autopilot: MavAutopilot,
17557 #[doc = "Heading"]
17558 pub heading: u8,
17559 #[doc = "Heading setpoint"]
17560 pub target_heading: u8,
17561 #[doc = "Throttle"]
17562 pub throttle: u8,
17563 #[doc = "Airspeed"]
17564 pub airspeed: u8,
17565 #[doc = "Airspeed setpoint"]
17566 pub airspeed_sp: u8,
17567 #[doc = "Groundspeed"]
17568 pub groundspeed: u8,
17569 #[doc = "Windspeed"]
17570 pub windspeed: u8,
17571 #[doc = "Wind heading"]
17572 pub wind_heading: u8,
17573 #[doc = "Maximum error horizontal position since last message"]
17574 pub eph: u8,
17575 #[doc = "Maximum error vertical position since last message"]
17576 pub epv: u8,
17577 #[doc = "Air temperature"]
17578 pub temperature_air: i8,
17579 #[doc = "Maximum climb rate magnitude since last message"]
17580 pub climb_rate: i8,
17581 #[doc = "Battery level (-1 if field not provided)."]
17582 pub battery: i8,
17583 #[doc = "Field for custom payload."]
17584 pub custom0: i8,
17585 #[doc = "Field for custom payload."]
17586 pub custom1: i8,
17587 #[doc = "Field for custom payload."]
17588 pub custom2: i8,
17589}
17590impl HIGH_LATENCY2_DATA {
17591 pub const ENCODED_LEN: usize = 42usize;
17592 pub const DEFAULT: Self = Self {
17593 timestamp: 0_u32,
17594 latitude: 0_i32,
17595 longitude: 0_i32,
17596 custom_mode: 0_u16,
17597 altitude: 0_i16,
17598 target_altitude: 0_i16,
17599 target_distance: 0_u16,
17600 wp_num: 0_u16,
17601 failure_flags: HlFailureFlag::DEFAULT,
17602 mavtype: MavType::DEFAULT,
17603 autopilot: MavAutopilot::DEFAULT,
17604 heading: 0_u8,
17605 target_heading: 0_u8,
17606 throttle: 0_u8,
17607 airspeed: 0_u8,
17608 airspeed_sp: 0_u8,
17609 groundspeed: 0_u8,
17610 windspeed: 0_u8,
17611 wind_heading: 0_u8,
17612 eph: 0_u8,
17613 epv: 0_u8,
17614 temperature_air: 0_i8,
17615 climb_rate: 0_i8,
17616 battery: 0_i8,
17617 custom0: 0_i8,
17618 custom1: 0_i8,
17619 custom2: 0_i8,
17620 };
17621 #[cfg(feature = "arbitrary")]
17622 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17623 use arbitrary::{Arbitrary, Unstructured};
17624 let mut buf = [0u8; 1024];
17625 rng.fill_bytes(&mut buf);
17626 let mut unstructured = Unstructured::new(&buf);
17627 Self::arbitrary(&mut unstructured).unwrap_or_default()
17628 }
17629}
17630impl Default for HIGH_LATENCY2_DATA {
17631 fn default() -> Self {
17632 Self::DEFAULT.clone()
17633 }
17634}
17635impl MessageData for HIGH_LATENCY2_DATA {
17636 type Message = MavMessage;
17637 const ID: u32 = 235u32;
17638 const NAME: &'static str = "HIGH_LATENCY2";
17639 const EXTRA_CRC: u8 = 179u8;
17640 const ENCODED_LEN: usize = 42usize;
17641 fn deser(
17642 _version: MavlinkVersion,
17643 __input: &[u8],
17644 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17645 let avail_len = __input.len();
17646 let mut payload_buf = [0; Self::ENCODED_LEN];
17647 let mut buf = if avail_len < Self::ENCODED_LEN {
17648 payload_buf[0..avail_len].copy_from_slice(__input);
17649 Bytes::new(&payload_buf)
17650 } else {
17651 Bytes::new(__input)
17652 };
17653 let mut __struct = Self::default();
17654 __struct.timestamp = buf.get_u32_le()?;
17655 __struct.latitude = buf.get_i32_le()?;
17656 __struct.longitude = buf.get_i32_le()?;
17657 __struct.custom_mode = buf.get_u16_le()?;
17658 __struct.altitude = buf.get_i16_le()?;
17659 __struct.target_altitude = buf.get_i16_le()?;
17660 __struct.target_distance = buf.get_u16_le()?;
17661 __struct.wp_num = buf.get_u16_le()?;
17662 let tmp = buf.get_u16_le()?;
17663 __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
17664 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17665 flag_type: "HlFailureFlag",
17666 value: tmp as u64,
17667 })?;
17668 let tmp = buf.get_u8()?;
17669 __struct.mavtype =
17670 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17671 enum_type: "MavType",
17672 value: tmp as u64,
17673 })?;
17674 let tmp = buf.get_u8()?;
17675 __struct.autopilot =
17676 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17677 enum_type: "MavAutopilot",
17678 value: tmp as u64,
17679 })?;
17680 __struct.heading = buf.get_u8()?;
17681 __struct.target_heading = buf.get_u8()?;
17682 __struct.throttle = buf.get_u8()?;
17683 __struct.airspeed = buf.get_u8()?;
17684 __struct.airspeed_sp = buf.get_u8()?;
17685 __struct.groundspeed = buf.get_u8()?;
17686 __struct.windspeed = buf.get_u8()?;
17687 __struct.wind_heading = buf.get_u8()?;
17688 __struct.eph = buf.get_u8()?;
17689 __struct.epv = buf.get_u8()?;
17690 __struct.temperature_air = buf.get_i8()?;
17691 __struct.climb_rate = buf.get_i8()?;
17692 __struct.battery = buf.get_i8()?;
17693 __struct.custom0 = buf.get_i8()?;
17694 __struct.custom1 = buf.get_i8()?;
17695 __struct.custom2 = buf.get_i8()?;
17696 Ok(__struct)
17697 }
17698 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17699 let mut __tmp = BytesMut::new(bytes);
17700 #[allow(clippy::absurd_extreme_comparisons)]
17701 #[allow(unused_comparisons)]
17702 if __tmp.remaining() < Self::ENCODED_LEN {
17703 panic!(
17704 "buffer is too small (need {} bytes, but got {})",
17705 Self::ENCODED_LEN,
17706 __tmp.remaining(),
17707 )
17708 }
17709 __tmp.put_u32_le(self.timestamp);
17710 __tmp.put_i32_le(self.latitude);
17711 __tmp.put_i32_le(self.longitude);
17712 __tmp.put_u16_le(self.custom_mode);
17713 __tmp.put_i16_le(self.altitude);
17714 __tmp.put_i16_le(self.target_altitude);
17715 __tmp.put_u16_le(self.target_distance);
17716 __tmp.put_u16_le(self.wp_num);
17717 __tmp.put_u16_le(self.failure_flags.bits() as u16);
17718 __tmp.put_u8(self.mavtype as u8);
17719 __tmp.put_u8(self.autopilot as u8);
17720 __tmp.put_u8(self.heading);
17721 __tmp.put_u8(self.target_heading);
17722 __tmp.put_u8(self.throttle);
17723 __tmp.put_u8(self.airspeed);
17724 __tmp.put_u8(self.airspeed_sp);
17725 __tmp.put_u8(self.groundspeed);
17726 __tmp.put_u8(self.windspeed);
17727 __tmp.put_u8(self.wind_heading);
17728 __tmp.put_u8(self.eph);
17729 __tmp.put_u8(self.epv);
17730 __tmp.put_i8(self.temperature_air);
17731 __tmp.put_i8(self.climb_rate);
17732 __tmp.put_i8(self.battery);
17733 __tmp.put_i8(self.custom0);
17734 __tmp.put_i8(self.custom1);
17735 __tmp.put_i8(self.custom2);
17736 if matches!(version, MavlinkVersion::V2) {
17737 let len = __tmp.len();
17738 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17739 } else {
17740 __tmp.len()
17741 }
17742 }
17743}
17744#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
17745#[doc = ""]
17746#[doc = "ID: 93"]
17747#[derive(Debug, Clone, PartialEq)]
17748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17750#[cfg_attr(feature = "ts", derive(TS))]
17751#[cfg_attr(feature = "ts", ts(export))]
17752pub struct HIL_ACTUATOR_CONTROLS_DATA {
17753 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17754 pub time_usec: u64,
17755 #[doc = "Flags bitmask."]
17756 pub flags: HilActuatorControlsFlags,
17757 #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
17758 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17759 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17760 pub controls: [f32; 16],
17761 #[doc = "System mode. Includes arming state."]
17762 pub mode: MavModeFlag,
17763}
17764impl HIL_ACTUATOR_CONTROLS_DATA {
17765 pub const ENCODED_LEN: usize = 81usize;
17766 pub const DEFAULT: Self = Self {
17767 time_usec: 0_u64,
17768 flags: HilActuatorControlsFlags::DEFAULT,
17769 controls: [0.0_f32; 16usize],
17770 mode: MavModeFlag::DEFAULT,
17771 };
17772 #[cfg(feature = "arbitrary")]
17773 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17774 use arbitrary::{Arbitrary, Unstructured};
17775 let mut buf = [0u8; 1024];
17776 rng.fill_bytes(&mut buf);
17777 let mut unstructured = Unstructured::new(&buf);
17778 Self::arbitrary(&mut unstructured).unwrap_or_default()
17779 }
17780}
17781impl Default for HIL_ACTUATOR_CONTROLS_DATA {
17782 fn default() -> Self {
17783 Self::DEFAULT.clone()
17784 }
17785}
17786impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
17787 type Message = MavMessage;
17788 const ID: u32 = 93u32;
17789 const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
17790 const EXTRA_CRC: u8 = 47u8;
17791 const ENCODED_LEN: usize = 81usize;
17792 fn deser(
17793 _version: MavlinkVersion,
17794 __input: &[u8],
17795 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17796 let avail_len = __input.len();
17797 let mut payload_buf = [0; Self::ENCODED_LEN];
17798 let mut buf = if avail_len < Self::ENCODED_LEN {
17799 payload_buf[0..avail_len].copy_from_slice(__input);
17800 Bytes::new(&payload_buf)
17801 } else {
17802 Bytes::new(__input)
17803 };
17804 let mut __struct = Self::default();
17805 __struct.time_usec = buf.get_u64_le()?;
17806 let tmp = buf.get_u64_le()?;
17807 __struct.flags =
17808 HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
17809 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17810 flag_type: "HilActuatorControlsFlags",
17811 value: tmp as u64,
17812 })?;
17813 for v in &mut __struct.controls {
17814 let val = buf.get_f32_le()?;
17815 *v = val;
17816 }
17817 let tmp = buf.get_u8()?;
17818 __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
17819 ::mavlink_core::error::ParserError::InvalidFlag {
17820 flag_type: "MavModeFlag",
17821 value: tmp as u64,
17822 },
17823 )?;
17824 Ok(__struct)
17825 }
17826 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17827 let mut __tmp = BytesMut::new(bytes);
17828 #[allow(clippy::absurd_extreme_comparisons)]
17829 #[allow(unused_comparisons)]
17830 if __tmp.remaining() < Self::ENCODED_LEN {
17831 panic!(
17832 "buffer is too small (need {} bytes, but got {})",
17833 Self::ENCODED_LEN,
17834 __tmp.remaining(),
17835 )
17836 }
17837 __tmp.put_u64_le(self.time_usec);
17838 __tmp.put_u64_le(self.flags.bits() as u64);
17839 for val in &self.controls {
17840 __tmp.put_f32_le(*val);
17841 }
17842 __tmp.put_u8(self.mode.bits() as u8);
17843 if matches!(version, MavlinkVersion::V2) {
17844 let len = __tmp.len();
17845 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17846 } else {
17847 __tmp.len()
17848 }
17849 }
17850}
17851#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
17852#[doc = ""]
17853#[doc = "ID: 91"]
17854#[derive(Debug, Clone, PartialEq)]
17855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17857#[cfg_attr(feature = "ts", derive(TS))]
17858#[cfg_attr(feature = "ts", ts(export))]
17859pub struct HIL_CONTROLS_DATA {
17860 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17861 pub time_usec: u64,
17862 #[doc = "Control output -1 .. 1"]
17863 pub roll_ailerons: f32,
17864 #[doc = "Control output -1 .. 1"]
17865 pub pitch_elevator: f32,
17866 #[doc = "Control output -1 .. 1"]
17867 pub yaw_rudder: f32,
17868 #[doc = "Throttle 0 .. 1"]
17869 pub throttle: f32,
17870 #[doc = "Aux 1, -1 .. 1"]
17871 pub aux1: f32,
17872 #[doc = "Aux 2, -1 .. 1"]
17873 pub aux2: f32,
17874 #[doc = "Aux 3, -1 .. 1"]
17875 pub aux3: f32,
17876 #[doc = "Aux 4, -1 .. 1"]
17877 pub aux4: f32,
17878 #[doc = "System mode."]
17879 pub mode: MavMode,
17880 #[doc = "Navigation mode (MAV_NAV_MODE)"]
17881 pub nav_mode: u8,
17882}
17883impl HIL_CONTROLS_DATA {
17884 pub const ENCODED_LEN: usize = 42usize;
17885 pub const DEFAULT: Self = Self {
17886 time_usec: 0_u64,
17887 roll_ailerons: 0.0_f32,
17888 pitch_elevator: 0.0_f32,
17889 yaw_rudder: 0.0_f32,
17890 throttle: 0.0_f32,
17891 aux1: 0.0_f32,
17892 aux2: 0.0_f32,
17893 aux3: 0.0_f32,
17894 aux4: 0.0_f32,
17895 mode: MavMode::DEFAULT,
17896 nav_mode: 0_u8,
17897 };
17898 #[cfg(feature = "arbitrary")]
17899 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17900 use arbitrary::{Arbitrary, Unstructured};
17901 let mut buf = [0u8; 1024];
17902 rng.fill_bytes(&mut buf);
17903 let mut unstructured = Unstructured::new(&buf);
17904 Self::arbitrary(&mut unstructured).unwrap_or_default()
17905 }
17906}
17907impl Default for HIL_CONTROLS_DATA {
17908 fn default() -> Self {
17909 Self::DEFAULT.clone()
17910 }
17911}
17912impl MessageData for HIL_CONTROLS_DATA {
17913 type Message = MavMessage;
17914 const ID: u32 = 91u32;
17915 const NAME: &'static str = "HIL_CONTROLS";
17916 const EXTRA_CRC: u8 = 63u8;
17917 const ENCODED_LEN: usize = 42usize;
17918 fn deser(
17919 _version: MavlinkVersion,
17920 __input: &[u8],
17921 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17922 let avail_len = __input.len();
17923 let mut payload_buf = [0; Self::ENCODED_LEN];
17924 let mut buf = if avail_len < Self::ENCODED_LEN {
17925 payload_buf[0..avail_len].copy_from_slice(__input);
17926 Bytes::new(&payload_buf)
17927 } else {
17928 Bytes::new(__input)
17929 };
17930 let mut __struct = Self::default();
17931 __struct.time_usec = buf.get_u64_le()?;
17932 __struct.roll_ailerons = buf.get_f32_le()?;
17933 __struct.pitch_elevator = buf.get_f32_le()?;
17934 __struct.yaw_rudder = buf.get_f32_le()?;
17935 __struct.throttle = buf.get_f32_le()?;
17936 __struct.aux1 = buf.get_f32_le()?;
17937 __struct.aux2 = buf.get_f32_le()?;
17938 __struct.aux3 = buf.get_f32_le()?;
17939 __struct.aux4 = buf.get_f32_le()?;
17940 let tmp = buf.get_u8()?;
17941 __struct.mode =
17942 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17943 enum_type: "MavMode",
17944 value: tmp as u64,
17945 })?;
17946 __struct.nav_mode = buf.get_u8()?;
17947 Ok(__struct)
17948 }
17949 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17950 let mut __tmp = BytesMut::new(bytes);
17951 #[allow(clippy::absurd_extreme_comparisons)]
17952 #[allow(unused_comparisons)]
17953 if __tmp.remaining() < Self::ENCODED_LEN {
17954 panic!(
17955 "buffer is too small (need {} bytes, but got {})",
17956 Self::ENCODED_LEN,
17957 __tmp.remaining(),
17958 )
17959 }
17960 __tmp.put_u64_le(self.time_usec);
17961 __tmp.put_f32_le(self.roll_ailerons);
17962 __tmp.put_f32_le(self.pitch_elevator);
17963 __tmp.put_f32_le(self.yaw_rudder);
17964 __tmp.put_f32_le(self.throttle);
17965 __tmp.put_f32_le(self.aux1);
17966 __tmp.put_f32_le(self.aux2);
17967 __tmp.put_f32_le(self.aux3);
17968 __tmp.put_f32_le(self.aux4);
17969 __tmp.put_u8(self.mode as u8);
17970 __tmp.put_u8(self.nav_mode);
17971 if matches!(version, MavlinkVersion::V2) {
17972 let len = __tmp.len();
17973 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17974 } else {
17975 __tmp.len()
17976 }
17977 }
17978}
17979#[doc = "The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
17980#[doc = ""]
17981#[doc = "ID: 113"]
17982#[derive(Debug, Clone, PartialEq)]
17983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17985#[cfg_attr(feature = "ts", derive(TS))]
17986#[cfg_attr(feature = "ts", ts(export))]
17987pub struct HIL_GPS_DATA {
17988 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17989 pub time_usec: u64,
17990 #[doc = "Latitude (WGS84)"]
17991 pub lat: i32,
17992 #[doc = "Longitude (WGS84)"]
17993 pub lon: i32,
17994 #[doc = "Altitude (MSL). Positive for up."]
17995 pub alt: i32,
17996 #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
17997 pub eph: u16,
17998 #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
17999 pub epv: u16,
18000 #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
18001 pub vel: u16,
18002 #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
18003 pub vn: i16,
18004 #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
18005 pub ve: i16,
18006 #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
18007 pub vd: i16,
18008 #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
18009 pub cog: u16,
18010 #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
18011 pub fix_type: u8,
18012 #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
18013 pub satellites_visible: u8,
18014 #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
18015 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18016 pub id: u8,
18017 #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
18018 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18019 pub yaw: u16,
18020}
18021impl HIL_GPS_DATA {
18022 pub const ENCODED_LEN: usize = 39usize;
18023 pub const DEFAULT: Self = Self {
18024 time_usec: 0_u64,
18025 lat: 0_i32,
18026 lon: 0_i32,
18027 alt: 0_i32,
18028 eph: 0_u16,
18029 epv: 0_u16,
18030 vel: 0_u16,
18031 vn: 0_i16,
18032 ve: 0_i16,
18033 vd: 0_i16,
18034 cog: 0_u16,
18035 fix_type: 0_u8,
18036 satellites_visible: 0_u8,
18037 id: 0_u8,
18038 yaw: 0_u16,
18039 };
18040 #[cfg(feature = "arbitrary")]
18041 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18042 use arbitrary::{Arbitrary, Unstructured};
18043 let mut buf = [0u8; 1024];
18044 rng.fill_bytes(&mut buf);
18045 let mut unstructured = Unstructured::new(&buf);
18046 Self::arbitrary(&mut unstructured).unwrap_or_default()
18047 }
18048}
18049impl Default for HIL_GPS_DATA {
18050 fn default() -> Self {
18051 Self::DEFAULT.clone()
18052 }
18053}
18054impl MessageData for HIL_GPS_DATA {
18055 type Message = MavMessage;
18056 const ID: u32 = 113u32;
18057 const NAME: &'static str = "HIL_GPS";
18058 const EXTRA_CRC: u8 = 124u8;
18059 const ENCODED_LEN: usize = 39usize;
18060 fn deser(
18061 _version: MavlinkVersion,
18062 __input: &[u8],
18063 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18064 let avail_len = __input.len();
18065 let mut payload_buf = [0; Self::ENCODED_LEN];
18066 let mut buf = if avail_len < Self::ENCODED_LEN {
18067 payload_buf[0..avail_len].copy_from_slice(__input);
18068 Bytes::new(&payload_buf)
18069 } else {
18070 Bytes::new(__input)
18071 };
18072 let mut __struct = Self::default();
18073 __struct.time_usec = buf.get_u64_le()?;
18074 __struct.lat = buf.get_i32_le()?;
18075 __struct.lon = buf.get_i32_le()?;
18076 __struct.alt = buf.get_i32_le()?;
18077 __struct.eph = buf.get_u16_le()?;
18078 __struct.epv = buf.get_u16_le()?;
18079 __struct.vel = buf.get_u16_le()?;
18080 __struct.vn = buf.get_i16_le()?;
18081 __struct.ve = buf.get_i16_le()?;
18082 __struct.vd = buf.get_i16_le()?;
18083 __struct.cog = buf.get_u16_le()?;
18084 __struct.fix_type = buf.get_u8()?;
18085 __struct.satellites_visible = buf.get_u8()?;
18086 __struct.id = buf.get_u8()?;
18087 __struct.yaw = buf.get_u16_le()?;
18088 Ok(__struct)
18089 }
18090 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18091 let mut __tmp = BytesMut::new(bytes);
18092 #[allow(clippy::absurd_extreme_comparisons)]
18093 #[allow(unused_comparisons)]
18094 if __tmp.remaining() < Self::ENCODED_LEN {
18095 panic!(
18096 "buffer is too small (need {} bytes, but got {})",
18097 Self::ENCODED_LEN,
18098 __tmp.remaining(),
18099 )
18100 }
18101 __tmp.put_u64_le(self.time_usec);
18102 __tmp.put_i32_le(self.lat);
18103 __tmp.put_i32_le(self.lon);
18104 __tmp.put_i32_le(self.alt);
18105 __tmp.put_u16_le(self.eph);
18106 __tmp.put_u16_le(self.epv);
18107 __tmp.put_u16_le(self.vel);
18108 __tmp.put_i16_le(self.vn);
18109 __tmp.put_i16_le(self.ve);
18110 __tmp.put_i16_le(self.vd);
18111 __tmp.put_u16_le(self.cog);
18112 __tmp.put_u8(self.fix_type);
18113 __tmp.put_u8(self.satellites_visible);
18114 if matches!(version, MavlinkVersion::V2) {
18115 __tmp.put_u8(self.id);
18116 __tmp.put_u16_le(self.yaw);
18117 let len = __tmp.len();
18118 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18119 } else {
18120 __tmp.len()
18121 }
18122 }
18123}
18124#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
18125#[doc = ""]
18126#[doc = "ID: 114"]
18127#[derive(Debug, Clone, PartialEq)]
18128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18130#[cfg_attr(feature = "ts", derive(TS))]
18131#[cfg_attr(feature = "ts", ts(export))]
18132pub struct HIL_OPTICAL_FLOW_DATA {
18133 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18134 pub time_usec: u64,
18135 #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
18136 pub integration_time_us: u32,
18137 #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
18138 pub integrated_x: f32,
18139 #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
18140 pub integrated_y: f32,
18141 #[doc = "RH rotation around X axis"]
18142 pub integrated_xgyro: f32,
18143 #[doc = "RH rotation around Y axis"]
18144 pub integrated_ygyro: f32,
18145 #[doc = "RH rotation around Z axis"]
18146 pub integrated_zgyro: f32,
18147 #[doc = "Time since the distance was sampled."]
18148 pub time_delta_distance_us: u32,
18149 #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
18150 pub distance: f32,
18151 #[doc = "Temperature"]
18152 pub temperature: i16,
18153 #[doc = "Sensor ID"]
18154 pub sensor_id: u8,
18155 #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
18156 pub quality: u8,
18157}
18158impl HIL_OPTICAL_FLOW_DATA {
18159 pub const ENCODED_LEN: usize = 44usize;
18160 pub const DEFAULT: Self = Self {
18161 time_usec: 0_u64,
18162 integration_time_us: 0_u32,
18163 integrated_x: 0.0_f32,
18164 integrated_y: 0.0_f32,
18165 integrated_xgyro: 0.0_f32,
18166 integrated_ygyro: 0.0_f32,
18167 integrated_zgyro: 0.0_f32,
18168 time_delta_distance_us: 0_u32,
18169 distance: 0.0_f32,
18170 temperature: 0_i16,
18171 sensor_id: 0_u8,
18172 quality: 0_u8,
18173 };
18174 #[cfg(feature = "arbitrary")]
18175 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18176 use arbitrary::{Arbitrary, Unstructured};
18177 let mut buf = [0u8; 1024];
18178 rng.fill_bytes(&mut buf);
18179 let mut unstructured = Unstructured::new(&buf);
18180 Self::arbitrary(&mut unstructured).unwrap_or_default()
18181 }
18182}
18183impl Default for HIL_OPTICAL_FLOW_DATA {
18184 fn default() -> Self {
18185 Self::DEFAULT.clone()
18186 }
18187}
18188impl MessageData for HIL_OPTICAL_FLOW_DATA {
18189 type Message = MavMessage;
18190 const ID: u32 = 114u32;
18191 const NAME: &'static str = "HIL_OPTICAL_FLOW";
18192 const EXTRA_CRC: u8 = 237u8;
18193 const ENCODED_LEN: usize = 44usize;
18194 fn deser(
18195 _version: MavlinkVersion,
18196 __input: &[u8],
18197 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18198 let avail_len = __input.len();
18199 let mut payload_buf = [0; Self::ENCODED_LEN];
18200 let mut buf = if avail_len < Self::ENCODED_LEN {
18201 payload_buf[0..avail_len].copy_from_slice(__input);
18202 Bytes::new(&payload_buf)
18203 } else {
18204 Bytes::new(__input)
18205 };
18206 let mut __struct = Self::default();
18207 __struct.time_usec = buf.get_u64_le()?;
18208 __struct.integration_time_us = buf.get_u32_le()?;
18209 __struct.integrated_x = buf.get_f32_le()?;
18210 __struct.integrated_y = buf.get_f32_le()?;
18211 __struct.integrated_xgyro = buf.get_f32_le()?;
18212 __struct.integrated_ygyro = buf.get_f32_le()?;
18213 __struct.integrated_zgyro = buf.get_f32_le()?;
18214 __struct.time_delta_distance_us = buf.get_u32_le()?;
18215 __struct.distance = buf.get_f32_le()?;
18216 __struct.temperature = buf.get_i16_le()?;
18217 __struct.sensor_id = buf.get_u8()?;
18218 __struct.quality = buf.get_u8()?;
18219 Ok(__struct)
18220 }
18221 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18222 let mut __tmp = BytesMut::new(bytes);
18223 #[allow(clippy::absurd_extreme_comparisons)]
18224 #[allow(unused_comparisons)]
18225 if __tmp.remaining() < Self::ENCODED_LEN {
18226 panic!(
18227 "buffer is too small (need {} bytes, but got {})",
18228 Self::ENCODED_LEN,
18229 __tmp.remaining(),
18230 )
18231 }
18232 __tmp.put_u64_le(self.time_usec);
18233 __tmp.put_u32_le(self.integration_time_us);
18234 __tmp.put_f32_le(self.integrated_x);
18235 __tmp.put_f32_le(self.integrated_y);
18236 __tmp.put_f32_le(self.integrated_xgyro);
18237 __tmp.put_f32_le(self.integrated_ygyro);
18238 __tmp.put_f32_le(self.integrated_zgyro);
18239 __tmp.put_u32_le(self.time_delta_distance_us);
18240 __tmp.put_f32_le(self.distance);
18241 __tmp.put_i16_le(self.temperature);
18242 __tmp.put_u8(self.sensor_id);
18243 __tmp.put_u8(self.quality);
18244 if matches!(version, MavlinkVersion::V2) {
18245 let len = __tmp.len();
18246 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18247 } else {
18248 __tmp.len()
18249 }
18250 }
18251}
18252#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
18253#[doc = ""]
18254#[doc = "ID: 92"]
18255#[derive(Debug, Clone, PartialEq)]
18256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18258#[cfg_attr(feature = "ts", derive(TS))]
18259#[cfg_attr(feature = "ts", ts(export))]
18260pub struct HIL_RC_INPUTS_RAW_DATA {
18261 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18262 pub time_usec: u64,
18263 #[doc = "RC channel 1 value"]
18264 pub chan1_raw: u16,
18265 #[doc = "RC channel 2 value"]
18266 pub chan2_raw: u16,
18267 #[doc = "RC channel 3 value"]
18268 pub chan3_raw: u16,
18269 #[doc = "RC channel 4 value"]
18270 pub chan4_raw: u16,
18271 #[doc = "RC channel 5 value"]
18272 pub chan5_raw: u16,
18273 #[doc = "RC channel 6 value"]
18274 pub chan6_raw: u16,
18275 #[doc = "RC channel 7 value"]
18276 pub chan7_raw: u16,
18277 #[doc = "RC channel 8 value"]
18278 pub chan8_raw: u16,
18279 #[doc = "RC channel 9 value"]
18280 pub chan9_raw: u16,
18281 #[doc = "RC channel 10 value"]
18282 pub chan10_raw: u16,
18283 #[doc = "RC channel 11 value"]
18284 pub chan11_raw: u16,
18285 #[doc = "RC channel 12 value"]
18286 pub chan12_raw: u16,
18287 #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
18288 pub rssi: u8,
18289}
18290impl HIL_RC_INPUTS_RAW_DATA {
18291 pub const ENCODED_LEN: usize = 33usize;
18292 pub const DEFAULT: Self = Self {
18293 time_usec: 0_u64,
18294 chan1_raw: 0_u16,
18295 chan2_raw: 0_u16,
18296 chan3_raw: 0_u16,
18297 chan4_raw: 0_u16,
18298 chan5_raw: 0_u16,
18299 chan6_raw: 0_u16,
18300 chan7_raw: 0_u16,
18301 chan8_raw: 0_u16,
18302 chan9_raw: 0_u16,
18303 chan10_raw: 0_u16,
18304 chan11_raw: 0_u16,
18305 chan12_raw: 0_u16,
18306 rssi: 0_u8,
18307 };
18308 #[cfg(feature = "arbitrary")]
18309 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18310 use arbitrary::{Arbitrary, Unstructured};
18311 let mut buf = [0u8; 1024];
18312 rng.fill_bytes(&mut buf);
18313 let mut unstructured = Unstructured::new(&buf);
18314 Self::arbitrary(&mut unstructured).unwrap_or_default()
18315 }
18316}
18317impl Default for HIL_RC_INPUTS_RAW_DATA {
18318 fn default() -> Self {
18319 Self::DEFAULT.clone()
18320 }
18321}
18322impl MessageData for HIL_RC_INPUTS_RAW_DATA {
18323 type Message = MavMessage;
18324 const ID: u32 = 92u32;
18325 const NAME: &'static str = "HIL_RC_INPUTS_RAW";
18326 const EXTRA_CRC: u8 = 54u8;
18327 const ENCODED_LEN: usize = 33usize;
18328 fn deser(
18329 _version: MavlinkVersion,
18330 __input: &[u8],
18331 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18332 let avail_len = __input.len();
18333 let mut payload_buf = [0; Self::ENCODED_LEN];
18334 let mut buf = if avail_len < Self::ENCODED_LEN {
18335 payload_buf[0..avail_len].copy_from_slice(__input);
18336 Bytes::new(&payload_buf)
18337 } else {
18338 Bytes::new(__input)
18339 };
18340 let mut __struct = Self::default();
18341 __struct.time_usec = buf.get_u64_le()?;
18342 __struct.chan1_raw = buf.get_u16_le()?;
18343 __struct.chan2_raw = buf.get_u16_le()?;
18344 __struct.chan3_raw = buf.get_u16_le()?;
18345 __struct.chan4_raw = buf.get_u16_le()?;
18346 __struct.chan5_raw = buf.get_u16_le()?;
18347 __struct.chan6_raw = buf.get_u16_le()?;
18348 __struct.chan7_raw = buf.get_u16_le()?;
18349 __struct.chan8_raw = buf.get_u16_le()?;
18350 __struct.chan9_raw = buf.get_u16_le()?;
18351 __struct.chan10_raw = buf.get_u16_le()?;
18352 __struct.chan11_raw = buf.get_u16_le()?;
18353 __struct.chan12_raw = buf.get_u16_le()?;
18354 __struct.rssi = buf.get_u8()?;
18355 Ok(__struct)
18356 }
18357 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18358 let mut __tmp = BytesMut::new(bytes);
18359 #[allow(clippy::absurd_extreme_comparisons)]
18360 #[allow(unused_comparisons)]
18361 if __tmp.remaining() < Self::ENCODED_LEN {
18362 panic!(
18363 "buffer is too small (need {} bytes, but got {})",
18364 Self::ENCODED_LEN,
18365 __tmp.remaining(),
18366 )
18367 }
18368 __tmp.put_u64_le(self.time_usec);
18369 __tmp.put_u16_le(self.chan1_raw);
18370 __tmp.put_u16_le(self.chan2_raw);
18371 __tmp.put_u16_le(self.chan3_raw);
18372 __tmp.put_u16_le(self.chan4_raw);
18373 __tmp.put_u16_le(self.chan5_raw);
18374 __tmp.put_u16_le(self.chan6_raw);
18375 __tmp.put_u16_le(self.chan7_raw);
18376 __tmp.put_u16_le(self.chan8_raw);
18377 __tmp.put_u16_le(self.chan9_raw);
18378 __tmp.put_u16_le(self.chan10_raw);
18379 __tmp.put_u16_le(self.chan11_raw);
18380 __tmp.put_u16_le(self.chan12_raw);
18381 __tmp.put_u8(self.rssi);
18382 if matches!(version, MavlinkVersion::V2) {
18383 let len = __tmp.len();
18384 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18385 } else {
18386 __tmp.len()
18387 }
18388 }
18389}
18390#[doc = "The IMU readings in SI units in NED body frame."]
18391#[doc = ""]
18392#[doc = "ID: 107"]
18393#[derive(Debug, Clone, PartialEq)]
18394#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18396#[cfg_attr(feature = "ts", derive(TS))]
18397#[cfg_attr(feature = "ts", ts(export))]
18398pub struct HIL_SENSOR_DATA {
18399 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18400 pub time_usec: u64,
18401 #[doc = "X acceleration"]
18402 pub xacc: f32,
18403 #[doc = "Y acceleration"]
18404 pub yacc: f32,
18405 #[doc = "Z acceleration"]
18406 pub zacc: f32,
18407 #[doc = "Angular speed around X axis in body frame"]
18408 pub xgyro: f32,
18409 #[doc = "Angular speed around Y axis in body frame"]
18410 pub ygyro: f32,
18411 #[doc = "Angular speed around Z axis in body frame"]
18412 pub zgyro: f32,
18413 #[doc = "X Magnetic field"]
18414 pub xmag: f32,
18415 #[doc = "Y Magnetic field"]
18416 pub ymag: f32,
18417 #[doc = "Z Magnetic field"]
18418 pub zmag: f32,
18419 #[doc = "Absolute pressure"]
18420 pub abs_pressure: f32,
18421 #[doc = "Differential pressure (airspeed)"]
18422 pub diff_pressure: f32,
18423 #[doc = "Altitude calculated from pressure"]
18424 pub pressure_alt: f32,
18425 #[doc = "Temperature"]
18426 pub temperature: f32,
18427 #[doc = "Bitmap for fields that have updated since last message"]
18428 pub fields_updated: HilSensorUpdatedFlags,
18429 #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
18430 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18431 pub id: u8,
18432}
18433impl HIL_SENSOR_DATA {
18434 pub const ENCODED_LEN: usize = 65usize;
18435 pub const DEFAULT: Self = Self {
18436 time_usec: 0_u64,
18437 xacc: 0.0_f32,
18438 yacc: 0.0_f32,
18439 zacc: 0.0_f32,
18440 xgyro: 0.0_f32,
18441 ygyro: 0.0_f32,
18442 zgyro: 0.0_f32,
18443 xmag: 0.0_f32,
18444 ymag: 0.0_f32,
18445 zmag: 0.0_f32,
18446 abs_pressure: 0.0_f32,
18447 diff_pressure: 0.0_f32,
18448 pressure_alt: 0.0_f32,
18449 temperature: 0.0_f32,
18450 fields_updated: HilSensorUpdatedFlags::DEFAULT,
18451 id: 0_u8,
18452 };
18453 #[cfg(feature = "arbitrary")]
18454 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18455 use arbitrary::{Arbitrary, Unstructured};
18456 let mut buf = [0u8; 1024];
18457 rng.fill_bytes(&mut buf);
18458 let mut unstructured = Unstructured::new(&buf);
18459 Self::arbitrary(&mut unstructured).unwrap_or_default()
18460 }
18461}
18462impl Default for HIL_SENSOR_DATA {
18463 fn default() -> Self {
18464 Self::DEFAULT.clone()
18465 }
18466}
18467impl MessageData for HIL_SENSOR_DATA {
18468 type Message = MavMessage;
18469 const ID: u32 = 107u32;
18470 const NAME: &'static str = "HIL_SENSOR";
18471 const EXTRA_CRC: u8 = 108u8;
18472 const ENCODED_LEN: usize = 65usize;
18473 fn deser(
18474 _version: MavlinkVersion,
18475 __input: &[u8],
18476 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18477 let avail_len = __input.len();
18478 let mut payload_buf = [0; Self::ENCODED_LEN];
18479 let mut buf = if avail_len < Self::ENCODED_LEN {
18480 payload_buf[0..avail_len].copy_from_slice(__input);
18481 Bytes::new(&payload_buf)
18482 } else {
18483 Bytes::new(__input)
18484 };
18485 let mut __struct = Self::default();
18486 __struct.time_usec = buf.get_u64_le()?;
18487 __struct.xacc = buf.get_f32_le()?;
18488 __struct.yacc = buf.get_f32_le()?;
18489 __struct.zacc = buf.get_f32_le()?;
18490 __struct.xgyro = buf.get_f32_le()?;
18491 __struct.ygyro = buf.get_f32_le()?;
18492 __struct.zgyro = buf.get_f32_le()?;
18493 __struct.xmag = buf.get_f32_le()?;
18494 __struct.ymag = buf.get_f32_le()?;
18495 __struct.zmag = buf.get_f32_le()?;
18496 __struct.abs_pressure = buf.get_f32_le()?;
18497 __struct.diff_pressure = buf.get_f32_le()?;
18498 __struct.pressure_alt = buf.get_f32_le()?;
18499 __struct.temperature = buf.get_f32_le()?;
18500 let tmp = buf.get_u32_le()?;
18501 __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
18502 tmp as <HilSensorUpdatedFlags as Flags>::Bits,
18503 )
18504 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18505 flag_type: "HilSensorUpdatedFlags",
18506 value: tmp as u64,
18507 })?;
18508 __struct.id = buf.get_u8()?;
18509 Ok(__struct)
18510 }
18511 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18512 let mut __tmp = BytesMut::new(bytes);
18513 #[allow(clippy::absurd_extreme_comparisons)]
18514 #[allow(unused_comparisons)]
18515 if __tmp.remaining() < Self::ENCODED_LEN {
18516 panic!(
18517 "buffer is too small (need {} bytes, but got {})",
18518 Self::ENCODED_LEN,
18519 __tmp.remaining(),
18520 )
18521 }
18522 __tmp.put_u64_le(self.time_usec);
18523 __tmp.put_f32_le(self.xacc);
18524 __tmp.put_f32_le(self.yacc);
18525 __tmp.put_f32_le(self.zacc);
18526 __tmp.put_f32_le(self.xgyro);
18527 __tmp.put_f32_le(self.ygyro);
18528 __tmp.put_f32_le(self.zgyro);
18529 __tmp.put_f32_le(self.xmag);
18530 __tmp.put_f32_le(self.ymag);
18531 __tmp.put_f32_le(self.zmag);
18532 __tmp.put_f32_le(self.abs_pressure);
18533 __tmp.put_f32_le(self.diff_pressure);
18534 __tmp.put_f32_le(self.pressure_alt);
18535 __tmp.put_f32_le(self.temperature);
18536 __tmp.put_u32_le(self.fields_updated.bits() as u32);
18537 if matches!(version, MavlinkVersion::V2) {
18538 __tmp.put_u8(self.id);
18539 let len = __tmp.len();
18540 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18541 } else {
18542 __tmp.len()
18543 }
18544 }
18545}
18546#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
18547#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
18548#[doc = ""]
18549#[doc = "ID: 90"]
18550#[derive(Debug, Clone, PartialEq)]
18551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18553#[cfg_attr(feature = "ts", derive(TS))]
18554#[cfg_attr(feature = "ts", ts(export))]
18555pub struct HIL_STATE_DATA {
18556 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18557 pub time_usec: u64,
18558 #[doc = "Roll angle"]
18559 pub roll: f32,
18560 #[doc = "Pitch angle"]
18561 pub pitch: f32,
18562 #[doc = "Yaw angle"]
18563 pub yaw: f32,
18564 #[doc = "Body frame roll / phi angular speed"]
18565 pub rollspeed: f32,
18566 #[doc = "Body frame pitch / theta angular speed"]
18567 pub pitchspeed: f32,
18568 #[doc = "Body frame yaw / psi angular speed"]
18569 pub yawspeed: f32,
18570 #[doc = "Latitude"]
18571 pub lat: i32,
18572 #[doc = "Longitude"]
18573 pub lon: i32,
18574 #[doc = "Altitude"]
18575 pub alt: i32,
18576 #[doc = "Ground X Speed (Latitude)"]
18577 pub vx: i16,
18578 #[doc = "Ground Y Speed (Longitude)"]
18579 pub vy: i16,
18580 #[doc = "Ground Z Speed (Altitude)"]
18581 pub vz: i16,
18582 #[doc = "X acceleration"]
18583 pub xacc: i16,
18584 #[doc = "Y acceleration"]
18585 pub yacc: i16,
18586 #[doc = "Z acceleration"]
18587 pub zacc: i16,
18588}
18589impl HIL_STATE_DATA {
18590 pub const ENCODED_LEN: usize = 56usize;
18591 pub const DEFAULT: Self = Self {
18592 time_usec: 0_u64,
18593 roll: 0.0_f32,
18594 pitch: 0.0_f32,
18595 yaw: 0.0_f32,
18596 rollspeed: 0.0_f32,
18597 pitchspeed: 0.0_f32,
18598 yawspeed: 0.0_f32,
18599 lat: 0_i32,
18600 lon: 0_i32,
18601 alt: 0_i32,
18602 vx: 0_i16,
18603 vy: 0_i16,
18604 vz: 0_i16,
18605 xacc: 0_i16,
18606 yacc: 0_i16,
18607 zacc: 0_i16,
18608 };
18609 #[cfg(feature = "arbitrary")]
18610 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18611 use arbitrary::{Arbitrary, Unstructured};
18612 let mut buf = [0u8; 1024];
18613 rng.fill_bytes(&mut buf);
18614 let mut unstructured = Unstructured::new(&buf);
18615 Self::arbitrary(&mut unstructured).unwrap_or_default()
18616 }
18617}
18618impl Default for HIL_STATE_DATA {
18619 fn default() -> Self {
18620 Self::DEFAULT.clone()
18621 }
18622}
18623impl MessageData for HIL_STATE_DATA {
18624 type Message = MavMessage;
18625 const ID: u32 = 90u32;
18626 const NAME: &'static str = "HIL_STATE";
18627 const EXTRA_CRC: u8 = 183u8;
18628 const ENCODED_LEN: usize = 56usize;
18629 fn deser(
18630 _version: MavlinkVersion,
18631 __input: &[u8],
18632 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18633 let avail_len = __input.len();
18634 let mut payload_buf = [0; Self::ENCODED_LEN];
18635 let mut buf = if avail_len < Self::ENCODED_LEN {
18636 payload_buf[0..avail_len].copy_from_slice(__input);
18637 Bytes::new(&payload_buf)
18638 } else {
18639 Bytes::new(__input)
18640 };
18641 let mut __struct = Self::default();
18642 __struct.time_usec = buf.get_u64_le()?;
18643 __struct.roll = buf.get_f32_le()?;
18644 __struct.pitch = buf.get_f32_le()?;
18645 __struct.yaw = buf.get_f32_le()?;
18646 __struct.rollspeed = buf.get_f32_le()?;
18647 __struct.pitchspeed = buf.get_f32_le()?;
18648 __struct.yawspeed = buf.get_f32_le()?;
18649 __struct.lat = buf.get_i32_le()?;
18650 __struct.lon = buf.get_i32_le()?;
18651 __struct.alt = buf.get_i32_le()?;
18652 __struct.vx = buf.get_i16_le()?;
18653 __struct.vy = buf.get_i16_le()?;
18654 __struct.vz = buf.get_i16_le()?;
18655 __struct.xacc = buf.get_i16_le()?;
18656 __struct.yacc = buf.get_i16_le()?;
18657 __struct.zacc = buf.get_i16_le()?;
18658 Ok(__struct)
18659 }
18660 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18661 let mut __tmp = BytesMut::new(bytes);
18662 #[allow(clippy::absurd_extreme_comparisons)]
18663 #[allow(unused_comparisons)]
18664 if __tmp.remaining() < Self::ENCODED_LEN {
18665 panic!(
18666 "buffer is too small (need {} bytes, but got {})",
18667 Self::ENCODED_LEN,
18668 __tmp.remaining(),
18669 )
18670 }
18671 __tmp.put_u64_le(self.time_usec);
18672 __tmp.put_f32_le(self.roll);
18673 __tmp.put_f32_le(self.pitch);
18674 __tmp.put_f32_le(self.yaw);
18675 __tmp.put_f32_le(self.rollspeed);
18676 __tmp.put_f32_le(self.pitchspeed);
18677 __tmp.put_f32_le(self.yawspeed);
18678 __tmp.put_i32_le(self.lat);
18679 __tmp.put_i32_le(self.lon);
18680 __tmp.put_i32_le(self.alt);
18681 __tmp.put_i16_le(self.vx);
18682 __tmp.put_i16_le(self.vy);
18683 __tmp.put_i16_le(self.vz);
18684 __tmp.put_i16_le(self.xacc);
18685 __tmp.put_i16_le(self.yacc);
18686 __tmp.put_i16_le(self.zacc);
18687 if matches!(version, MavlinkVersion::V2) {
18688 let len = __tmp.len();
18689 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18690 } else {
18691 __tmp.len()
18692 }
18693 }
18694}
18695#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
18696#[doc = ""]
18697#[doc = "ID: 115"]
18698#[derive(Debug, Clone, PartialEq)]
18699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18701#[cfg_attr(feature = "ts", derive(TS))]
18702#[cfg_attr(feature = "ts", ts(export))]
18703pub struct HIL_STATE_QUATERNION_DATA {
18704 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18705 pub time_usec: u64,
18706 #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
18707 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18708 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18709 pub attitude_quaternion: [f32; 4],
18710 #[doc = "Body frame roll / phi angular speed"]
18711 pub rollspeed: f32,
18712 #[doc = "Body frame pitch / theta angular speed"]
18713 pub pitchspeed: f32,
18714 #[doc = "Body frame yaw / psi angular speed"]
18715 pub yawspeed: f32,
18716 #[doc = "Latitude"]
18717 pub lat: i32,
18718 #[doc = "Longitude"]
18719 pub lon: i32,
18720 #[doc = "Altitude"]
18721 pub alt: i32,
18722 #[doc = "Ground X Speed (Latitude)"]
18723 pub vx: i16,
18724 #[doc = "Ground Y Speed (Longitude)"]
18725 pub vy: i16,
18726 #[doc = "Ground Z Speed (Altitude)"]
18727 pub vz: i16,
18728 #[doc = "Indicated airspeed"]
18729 pub ind_airspeed: u16,
18730 #[doc = "True airspeed"]
18731 pub true_airspeed: u16,
18732 #[doc = "X acceleration"]
18733 pub xacc: i16,
18734 #[doc = "Y acceleration"]
18735 pub yacc: i16,
18736 #[doc = "Z acceleration"]
18737 pub zacc: i16,
18738}
18739impl HIL_STATE_QUATERNION_DATA {
18740 pub const ENCODED_LEN: usize = 64usize;
18741 pub const DEFAULT: Self = Self {
18742 time_usec: 0_u64,
18743 attitude_quaternion: [0.0_f32; 4usize],
18744 rollspeed: 0.0_f32,
18745 pitchspeed: 0.0_f32,
18746 yawspeed: 0.0_f32,
18747 lat: 0_i32,
18748 lon: 0_i32,
18749 alt: 0_i32,
18750 vx: 0_i16,
18751 vy: 0_i16,
18752 vz: 0_i16,
18753 ind_airspeed: 0_u16,
18754 true_airspeed: 0_u16,
18755 xacc: 0_i16,
18756 yacc: 0_i16,
18757 zacc: 0_i16,
18758 };
18759 #[cfg(feature = "arbitrary")]
18760 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18761 use arbitrary::{Arbitrary, Unstructured};
18762 let mut buf = [0u8; 1024];
18763 rng.fill_bytes(&mut buf);
18764 let mut unstructured = Unstructured::new(&buf);
18765 Self::arbitrary(&mut unstructured).unwrap_or_default()
18766 }
18767}
18768impl Default for HIL_STATE_QUATERNION_DATA {
18769 fn default() -> Self {
18770 Self::DEFAULT.clone()
18771 }
18772}
18773impl MessageData for HIL_STATE_QUATERNION_DATA {
18774 type Message = MavMessage;
18775 const ID: u32 = 115u32;
18776 const NAME: &'static str = "HIL_STATE_QUATERNION";
18777 const EXTRA_CRC: u8 = 4u8;
18778 const ENCODED_LEN: usize = 64usize;
18779 fn deser(
18780 _version: MavlinkVersion,
18781 __input: &[u8],
18782 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18783 let avail_len = __input.len();
18784 let mut payload_buf = [0; Self::ENCODED_LEN];
18785 let mut buf = if avail_len < Self::ENCODED_LEN {
18786 payload_buf[0..avail_len].copy_from_slice(__input);
18787 Bytes::new(&payload_buf)
18788 } else {
18789 Bytes::new(__input)
18790 };
18791 let mut __struct = Self::default();
18792 __struct.time_usec = buf.get_u64_le()?;
18793 for v in &mut __struct.attitude_quaternion {
18794 let val = buf.get_f32_le()?;
18795 *v = val;
18796 }
18797 __struct.rollspeed = buf.get_f32_le()?;
18798 __struct.pitchspeed = buf.get_f32_le()?;
18799 __struct.yawspeed = buf.get_f32_le()?;
18800 __struct.lat = buf.get_i32_le()?;
18801 __struct.lon = buf.get_i32_le()?;
18802 __struct.alt = buf.get_i32_le()?;
18803 __struct.vx = buf.get_i16_le()?;
18804 __struct.vy = buf.get_i16_le()?;
18805 __struct.vz = buf.get_i16_le()?;
18806 __struct.ind_airspeed = buf.get_u16_le()?;
18807 __struct.true_airspeed = buf.get_u16_le()?;
18808 __struct.xacc = buf.get_i16_le()?;
18809 __struct.yacc = buf.get_i16_le()?;
18810 __struct.zacc = buf.get_i16_le()?;
18811 Ok(__struct)
18812 }
18813 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18814 let mut __tmp = BytesMut::new(bytes);
18815 #[allow(clippy::absurd_extreme_comparisons)]
18816 #[allow(unused_comparisons)]
18817 if __tmp.remaining() < Self::ENCODED_LEN {
18818 panic!(
18819 "buffer is too small (need {} bytes, but got {})",
18820 Self::ENCODED_LEN,
18821 __tmp.remaining(),
18822 )
18823 }
18824 __tmp.put_u64_le(self.time_usec);
18825 for val in &self.attitude_quaternion {
18826 __tmp.put_f32_le(*val);
18827 }
18828 __tmp.put_f32_le(self.rollspeed);
18829 __tmp.put_f32_le(self.pitchspeed);
18830 __tmp.put_f32_le(self.yawspeed);
18831 __tmp.put_i32_le(self.lat);
18832 __tmp.put_i32_le(self.lon);
18833 __tmp.put_i32_le(self.alt);
18834 __tmp.put_i16_le(self.vx);
18835 __tmp.put_i16_le(self.vy);
18836 __tmp.put_i16_le(self.vz);
18837 __tmp.put_u16_le(self.ind_airspeed);
18838 __tmp.put_u16_le(self.true_airspeed);
18839 __tmp.put_i16_le(self.xacc);
18840 __tmp.put_i16_le(self.yacc);
18841 __tmp.put_i16_le(self.zacc);
18842 if matches!(version, MavlinkVersion::V2) {
18843 let len = __tmp.len();
18844 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18845 } else {
18846 __tmp.len()
18847 }
18848 }
18849}
18850#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
18851#[doc = ""]
18852#[doc = "ID: 242"]
18853#[derive(Debug, Clone, PartialEq)]
18854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18856#[cfg_attr(feature = "ts", derive(TS))]
18857#[cfg_attr(feature = "ts", ts(export))]
18858pub struct HOME_POSITION_DATA {
18859 #[doc = "Latitude (WGS84)"]
18860 pub latitude: i32,
18861 #[doc = "Longitude (WGS84)"]
18862 pub longitude: i32,
18863 #[doc = "Altitude (MSL). Positive for up."]
18864 pub altitude: i32,
18865 #[doc = "Local X position of this position in the local coordinate frame (NED)"]
18866 pub x: f32,
18867 #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
18868 pub y: f32,
18869 #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
18870 pub z: f32,
18871 #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground. All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
18872 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18873 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18874 pub q: [f32; 4],
18875 #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
18876 pub approach_x: f32,
18877 #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
18878 pub approach_y: f32,
18879 #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
18880 pub approach_z: f32,
18881 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18882 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18883 pub time_usec: u64,
18884}
18885impl HOME_POSITION_DATA {
18886 pub const ENCODED_LEN: usize = 60usize;
18887 pub const DEFAULT: Self = Self {
18888 latitude: 0_i32,
18889 longitude: 0_i32,
18890 altitude: 0_i32,
18891 x: 0.0_f32,
18892 y: 0.0_f32,
18893 z: 0.0_f32,
18894 q: [0.0_f32; 4usize],
18895 approach_x: 0.0_f32,
18896 approach_y: 0.0_f32,
18897 approach_z: 0.0_f32,
18898 time_usec: 0_u64,
18899 };
18900 #[cfg(feature = "arbitrary")]
18901 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18902 use arbitrary::{Arbitrary, Unstructured};
18903 let mut buf = [0u8; 1024];
18904 rng.fill_bytes(&mut buf);
18905 let mut unstructured = Unstructured::new(&buf);
18906 Self::arbitrary(&mut unstructured).unwrap_or_default()
18907 }
18908}
18909impl Default for HOME_POSITION_DATA {
18910 fn default() -> Self {
18911 Self::DEFAULT.clone()
18912 }
18913}
18914impl MessageData for HOME_POSITION_DATA {
18915 type Message = MavMessage;
18916 const ID: u32 = 242u32;
18917 const NAME: &'static str = "HOME_POSITION";
18918 const EXTRA_CRC: u8 = 104u8;
18919 const ENCODED_LEN: usize = 60usize;
18920 fn deser(
18921 _version: MavlinkVersion,
18922 __input: &[u8],
18923 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18924 let avail_len = __input.len();
18925 let mut payload_buf = [0; Self::ENCODED_LEN];
18926 let mut buf = if avail_len < Self::ENCODED_LEN {
18927 payload_buf[0..avail_len].copy_from_slice(__input);
18928 Bytes::new(&payload_buf)
18929 } else {
18930 Bytes::new(__input)
18931 };
18932 let mut __struct = Self::default();
18933 __struct.latitude = buf.get_i32_le()?;
18934 __struct.longitude = buf.get_i32_le()?;
18935 __struct.altitude = buf.get_i32_le()?;
18936 __struct.x = buf.get_f32_le()?;
18937 __struct.y = buf.get_f32_le()?;
18938 __struct.z = buf.get_f32_le()?;
18939 for v in &mut __struct.q {
18940 let val = buf.get_f32_le()?;
18941 *v = val;
18942 }
18943 __struct.approach_x = buf.get_f32_le()?;
18944 __struct.approach_y = buf.get_f32_le()?;
18945 __struct.approach_z = buf.get_f32_le()?;
18946 __struct.time_usec = buf.get_u64_le()?;
18947 Ok(__struct)
18948 }
18949 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18950 let mut __tmp = BytesMut::new(bytes);
18951 #[allow(clippy::absurd_extreme_comparisons)]
18952 #[allow(unused_comparisons)]
18953 if __tmp.remaining() < Self::ENCODED_LEN {
18954 panic!(
18955 "buffer is too small (need {} bytes, but got {})",
18956 Self::ENCODED_LEN,
18957 __tmp.remaining(),
18958 )
18959 }
18960 __tmp.put_i32_le(self.latitude);
18961 __tmp.put_i32_le(self.longitude);
18962 __tmp.put_i32_le(self.altitude);
18963 __tmp.put_f32_le(self.x);
18964 __tmp.put_f32_le(self.y);
18965 __tmp.put_f32_le(self.z);
18966 for val in &self.q {
18967 __tmp.put_f32_le(*val);
18968 }
18969 __tmp.put_f32_le(self.approach_x);
18970 __tmp.put_f32_le(self.approach_y);
18971 __tmp.put_f32_le(self.approach_z);
18972 if matches!(version, MavlinkVersion::V2) {
18973 __tmp.put_u64_le(self.time_usec);
18974 let len = __tmp.len();
18975 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18976 } else {
18977 __tmp.len()
18978 }
18979 }
18980}
18981#[doc = "Temperature and humidity from hygrometer."]
18982#[doc = ""]
18983#[doc = "ID: 12920"]
18984#[derive(Debug, Clone, PartialEq)]
18985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18987#[cfg_attr(feature = "ts", derive(TS))]
18988#[cfg_attr(feature = "ts", ts(export))]
18989pub struct HYGROMETER_SENSOR_DATA {
18990 #[doc = "Temperature"]
18991 pub temperature: i16,
18992 #[doc = "Humidity"]
18993 pub humidity: u16,
18994 #[doc = "Hygrometer ID"]
18995 pub id: u8,
18996}
18997impl HYGROMETER_SENSOR_DATA {
18998 pub const ENCODED_LEN: usize = 5usize;
18999 pub const DEFAULT: Self = Self {
19000 temperature: 0_i16,
19001 humidity: 0_u16,
19002 id: 0_u8,
19003 };
19004 #[cfg(feature = "arbitrary")]
19005 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19006 use arbitrary::{Arbitrary, Unstructured};
19007 let mut buf = [0u8; 1024];
19008 rng.fill_bytes(&mut buf);
19009 let mut unstructured = Unstructured::new(&buf);
19010 Self::arbitrary(&mut unstructured).unwrap_or_default()
19011 }
19012}
19013impl Default for HYGROMETER_SENSOR_DATA {
19014 fn default() -> Self {
19015 Self::DEFAULT.clone()
19016 }
19017}
19018impl MessageData for HYGROMETER_SENSOR_DATA {
19019 type Message = MavMessage;
19020 const ID: u32 = 12920u32;
19021 const NAME: &'static str = "HYGROMETER_SENSOR";
19022 const EXTRA_CRC: u8 = 20u8;
19023 const ENCODED_LEN: usize = 5usize;
19024 fn deser(
19025 _version: MavlinkVersion,
19026 __input: &[u8],
19027 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19028 let avail_len = __input.len();
19029 let mut payload_buf = [0; Self::ENCODED_LEN];
19030 let mut buf = if avail_len < Self::ENCODED_LEN {
19031 payload_buf[0..avail_len].copy_from_slice(__input);
19032 Bytes::new(&payload_buf)
19033 } else {
19034 Bytes::new(__input)
19035 };
19036 let mut __struct = Self::default();
19037 __struct.temperature = buf.get_i16_le()?;
19038 __struct.humidity = buf.get_u16_le()?;
19039 __struct.id = buf.get_u8()?;
19040 Ok(__struct)
19041 }
19042 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19043 let mut __tmp = BytesMut::new(bytes);
19044 #[allow(clippy::absurd_extreme_comparisons)]
19045 #[allow(unused_comparisons)]
19046 if __tmp.remaining() < Self::ENCODED_LEN {
19047 panic!(
19048 "buffer is too small (need {} bytes, but got {})",
19049 Self::ENCODED_LEN,
19050 __tmp.remaining(),
19051 )
19052 }
19053 __tmp.put_i16_le(self.temperature);
19054 __tmp.put_u16_le(self.humidity);
19055 __tmp.put_u8(self.id);
19056 if matches!(version, MavlinkVersion::V2) {
19057 let len = __tmp.len();
19058 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19059 } else {
19060 __tmp.len()
19061 }
19062 }
19063}
19064#[doc = "Illuminator status."]
19065#[doc = ""]
19066#[doc = "ID: 440"]
19067#[derive(Debug, Clone, PartialEq)]
19068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19070#[cfg_attr(feature = "ts", derive(TS))]
19071#[cfg_attr(feature = "ts", ts(export))]
19072pub struct ILLUMINATOR_STATUS_DATA {
19073 #[doc = "Time since the start-up of the illuminator in ms"]
19074 pub uptime_ms: u32,
19075 #[doc = "Errors"]
19076 pub error_status: IlluminatorErrorFlags,
19077 #[doc = "Illuminator brightness"]
19078 pub brightness: f32,
19079 #[doc = "Illuminator strobing period in seconds"]
19080 pub strobe_period: f32,
19081 #[doc = "Illuminator strobing duty cycle"]
19082 pub strobe_duty_cycle: f32,
19083 #[doc = "Temperature in Celsius"]
19084 pub temp_c: f32,
19085 #[doc = "Minimum strobing period in seconds"]
19086 pub min_strobe_period: f32,
19087 #[doc = "Maximum strobing period in seconds"]
19088 pub max_strobe_period: f32,
19089 #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
19090 pub enable: u8,
19091 #[doc = "Supported illuminator modes"]
19092 pub mode_bitmask: IlluminatorMode,
19093 #[doc = "Illuminator mode"]
19094 pub mode: IlluminatorMode,
19095}
19096impl ILLUMINATOR_STATUS_DATA {
19097 pub const ENCODED_LEN: usize = 35usize;
19098 pub const DEFAULT: Self = Self {
19099 uptime_ms: 0_u32,
19100 error_status: IlluminatorErrorFlags::DEFAULT,
19101 brightness: 0.0_f32,
19102 strobe_period: 0.0_f32,
19103 strobe_duty_cycle: 0.0_f32,
19104 temp_c: 0.0_f32,
19105 min_strobe_period: 0.0_f32,
19106 max_strobe_period: 0.0_f32,
19107 enable: 0_u8,
19108 mode_bitmask: IlluminatorMode::DEFAULT,
19109 mode: IlluminatorMode::DEFAULT,
19110 };
19111 #[cfg(feature = "arbitrary")]
19112 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19113 use arbitrary::{Arbitrary, Unstructured};
19114 let mut buf = [0u8; 1024];
19115 rng.fill_bytes(&mut buf);
19116 let mut unstructured = Unstructured::new(&buf);
19117 Self::arbitrary(&mut unstructured).unwrap_or_default()
19118 }
19119}
19120impl Default for ILLUMINATOR_STATUS_DATA {
19121 fn default() -> Self {
19122 Self::DEFAULT.clone()
19123 }
19124}
19125impl MessageData for ILLUMINATOR_STATUS_DATA {
19126 type Message = MavMessage;
19127 const ID: u32 = 440u32;
19128 const NAME: &'static str = "ILLUMINATOR_STATUS";
19129 const EXTRA_CRC: u8 = 66u8;
19130 const ENCODED_LEN: usize = 35usize;
19131 fn deser(
19132 _version: MavlinkVersion,
19133 __input: &[u8],
19134 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19135 let avail_len = __input.len();
19136 let mut payload_buf = [0; Self::ENCODED_LEN];
19137 let mut buf = if avail_len < Self::ENCODED_LEN {
19138 payload_buf[0..avail_len].copy_from_slice(__input);
19139 Bytes::new(&payload_buf)
19140 } else {
19141 Bytes::new(__input)
19142 };
19143 let mut __struct = Self::default();
19144 __struct.uptime_ms = buf.get_u32_le()?;
19145 let tmp = buf.get_u32_le()?;
19146 __struct.error_status = IlluminatorErrorFlags::from_bits(
19147 tmp as <IlluminatorErrorFlags as Flags>::Bits,
19148 )
19149 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19150 flag_type: "IlluminatorErrorFlags",
19151 value: tmp as u64,
19152 })?;
19153 __struct.brightness = buf.get_f32_le()?;
19154 __struct.strobe_period = buf.get_f32_le()?;
19155 __struct.strobe_duty_cycle = buf.get_f32_le()?;
19156 __struct.temp_c = buf.get_f32_le()?;
19157 __struct.min_strobe_period = buf.get_f32_le()?;
19158 __struct.max_strobe_period = buf.get_f32_le()?;
19159 __struct.enable = buf.get_u8()?;
19160 let tmp = buf.get_u8()?;
19161 __struct.mode_bitmask =
19162 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19163 enum_type: "IlluminatorMode",
19164 value: tmp as u64,
19165 })?;
19166 let tmp = buf.get_u8()?;
19167 __struct.mode =
19168 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19169 enum_type: "IlluminatorMode",
19170 value: tmp as u64,
19171 })?;
19172 Ok(__struct)
19173 }
19174 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19175 let mut __tmp = BytesMut::new(bytes);
19176 #[allow(clippy::absurd_extreme_comparisons)]
19177 #[allow(unused_comparisons)]
19178 if __tmp.remaining() < Self::ENCODED_LEN {
19179 panic!(
19180 "buffer is too small (need {} bytes, but got {})",
19181 Self::ENCODED_LEN,
19182 __tmp.remaining(),
19183 )
19184 }
19185 __tmp.put_u32_le(self.uptime_ms);
19186 __tmp.put_u32_le(self.error_status.bits() as u32);
19187 __tmp.put_f32_le(self.brightness);
19188 __tmp.put_f32_le(self.strobe_period);
19189 __tmp.put_f32_le(self.strobe_duty_cycle);
19190 __tmp.put_f32_le(self.temp_c);
19191 __tmp.put_f32_le(self.min_strobe_period);
19192 __tmp.put_f32_le(self.max_strobe_period);
19193 __tmp.put_u8(self.enable);
19194 __tmp.put_u8(self.mode_bitmask as u8);
19195 __tmp.put_u8(self.mode as u8);
19196 if matches!(version, MavlinkVersion::V2) {
19197 let len = __tmp.len();
19198 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19199 } else {
19200 __tmp.len()
19201 }
19202 }
19203}
19204#[doc = "Status of the Iridium SBD link."]
19205#[doc = ""]
19206#[doc = "ID: 335"]
19207#[derive(Debug, Clone, PartialEq)]
19208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19210#[cfg_attr(feature = "ts", derive(TS))]
19211#[cfg_attr(feature = "ts", ts(export))]
19212pub struct ISBD_LINK_STATUS_DATA {
19213 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19214 pub timestamp: u64,
19215 #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19216 pub last_heartbeat: u64,
19217 #[doc = "Number of failed SBD sessions."]
19218 pub failed_sessions: u16,
19219 #[doc = "Number of successful SBD sessions."]
19220 pub successful_sessions: u16,
19221 #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
19222 pub signal_quality: u8,
19223 #[doc = "1: Ring call pending, 0: No call pending."]
19224 pub ring_pending: u8,
19225 #[doc = "1: Transmission session pending, 0: No transmission session pending."]
19226 pub tx_session_pending: u8,
19227 #[doc = "1: Receiving session pending, 0: No receiving session pending."]
19228 pub rx_session_pending: u8,
19229}
19230impl ISBD_LINK_STATUS_DATA {
19231 pub const ENCODED_LEN: usize = 24usize;
19232 pub const DEFAULT: Self = Self {
19233 timestamp: 0_u64,
19234 last_heartbeat: 0_u64,
19235 failed_sessions: 0_u16,
19236 successful_sessions: 0_u16,
19237 signal_quality: 0_u8,
19238 ring_pending: 0_u8,
19239 tx_session_pending: 0_u8,
19240 rx_session_pending: 0_u8,
19241 };
19242 #[cfg(feature = "arbitrary")]
19243 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19244 use arbitrary::{Arbitrary, Unstructured};
19245 let mut buf = [0u8; 1024];
19246 rng.fill_bytes(&mut buf);
19247 let mut unstructured = Unstructured::new(&buf);
19248 Self::arbitrary(&mut unstructured).unwrap_or_default()
19249 }
19250}
19251impl Default for ISBD_LINK_STATUS_DATA {
19252 fn default() -> Self {
19253 Self::DEFAULT.clone()
19254 }
19255}
19256impl MessageData for ISBD_LINK_STATUS_DATA {
19257 type Message = MavMessage;
19258 const ID: u32 = 335u32;
19259 const NAME: &'static str = "ISBD_LINK_STATUS";
19260 const EXTRA_CRC: u8 = 225u8;
19261 const ENCODED_LEN: usize = 24usize;
19262 fn deser(
19263 _version: MavlinkVersion,
19264 __input: &[u8],
19265 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19266 let avail_len = __input.len();
19267 let mut payload_buf = [0; Self::ENCODED_LEN];
19268 let mut buf = if avail_len < Self::ENCODED_LEN {
19269 payload_buf[0..avail_len].copy_from_slice(__input);
19270 Bytes::new(&payload_buf)
19271 } else {
19272 Bytes::new(__input)
19273 };
19274 let mut __struct = Self::default();
19275 __struct.timestamp = buf.get_u64_le()?;
19276 __struct.last_heartbeat = buf.get_u64_le()?;
19277 __struct.failed_sessions = buf.get_u16_le()?;
19278 __struct.successful_sessions = buf.get_u16_le()?;
19279 __struct.signal_quality = buf.get_u8()?;
19280 __struct.ring_pending = buf.get_u8()?;
19281 __struct.tx_session_pending = buf.get_u8()?;
19282 __struct.rx_session_pending = buf.get_u8()?;
19283 Ok(__struct)
19284 }
19285 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19286 let mut __tmp = BytesMut::new(bytes);
19287 #[allow(clippy::absurd_extreme_comparisons)]
19288 #[allow(unused_comparisons)]
19289 if __tmp.remaining() < Self::ENCODED_LEN {
19290 panic!(
19291 "buffer is too small (need {} bytes, but got {})",
19292 Self::ENCODED_LEN,
19293 __tmp.remaining(),
19294 )
19295 }
19296 __tmp.put_u64_le(self.timestamp);
19297 __tmp.put_u64_le(self.last_heartbeat);
19298 __tmp.put_u16_le(self.failed_sessions);
19299 __tmp.put_u16_le(self.successful_sessions);
19300 __tmp.put_u8(self.signal_quality);
19301 __tmp.put_u8(self.ring_pending);
19302 __tmp.put_u8(self.tx_session_pending);
19303 __tmp.put_u8(self.rx_session_pending);
19304 if matches!(version, MavlinkVersion::V2) {
19305 let len = __tmp.len();
19306 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19307 } else {
19308 __tmp.len()
19309 }
19310 }
19311}
19312#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
19313#[doc = ""]
19314#[doc = "ID: 149"]
19315#[derive(Debug, Clone, PartialEq)]
19316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19318#[cfg_attr(feature = "ts", derive(TS))]
19319#[cfg_attr(feature = "ts", ts(export))]
19320pub struct LANDING_TARGET_DATA {
19321 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19322 pub time_usec: u64,
19323 #[doc = "X-axis angular offset of the target from the center of the image"]
19324 pub angle_x: f32,
19325 #[doc = "Y-axis angular offset of the target from the center of the image"]
19326 pub angle_y: f32,
19327 #[doc = "Distance to the target from the vehicle"]
19328 pub distance: f32,
19329 #[doc = "Size of target along x-axis"]
19330 pub size_x: f32,
19331 #[doc = "Size of target along y-axis"]
19332 pub size_y: f32,
19333 #[doc = "The ID of the target if multiple targets are present"]
19334 pub target_num: u8,
19335 #[doc = "Coordinate frame used for following fields."]
19336 pub frame: MavFrame,
19337 #[doc = "X Position of the landing target in MAV_FRAME"]
19338 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19339 pub x: f32,
19340 #[doc = "Y Position of the landing target in MAV_FRAME"]
19341 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19342 pub y: f32,
19343 #[doc = "Z Position of the landing target in MAV_FRAME"]
19344 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19345 pub z: f32,
19346 #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
19347 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19348 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19349 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19350 pub q: [f32; 4],
19351 #[doc = "Type of landing target"]
19352 #[cfg_attr(feature = "serde", serde(default))]
19353 pub mavtype: LandingTargetType,
19354 #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
19355 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19356 pub position_valid: u8,
19357}
19358impl LANDING_TARGET_DATA {
19359 pub const ENCODED_LEN: usize = 60usize;
19360 pub const DEFAULT: Self = Self {
19361 time_usec: 0_u64,
19362 angle_x: 0.0_f32,
19363 angle_y: 0.0_f32,
19364 distance: 0.0_f32,
19365 size_x: 0.0_f32,
19366 size_y: 0.0_f32,
19367 target_num: 0_u8,
19368 frame: MavFrame::DEFAULT,
19369 x: 0.0_f32,
19370 y: 0.0_f32,
19371 z: 0.0_f32,
19372 q: [0.0_f32; 4usize],
19373 mavtype: LandingTargetType::DEFAULT,
19374 position_valid: 0_u8,
19375 };
19376 #[cfg(feature = "arbitrary")]
19377 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19378 use arbitrary::{Arbitrary, Unstructured};
19379 let mut buf = [0u8; 1024];
19380 rng.fill_bytes(&mut buf);
19381 let mut unstructured = Unstructured::new(&buf);
19382 Self::arbitrary(&mut unstructured).unwrap_or_default()
19383 }
19384}
19385impl Default for LANDING_TARGET_DATA {
19386 fn default() -> Self {
19387 Self::DEFAULT.clone()
19388 }
19389}
19390impl MessageData for LANDING_TARGET_DATA {
19391 type Message = MavMessage;
19392 const ID: u32 = 149u32;
19393 const NAME: &'static str = "LANDING_TARGET";
19394 const EXTRA_CRC: u8 = 200u8;
19395 const ENCODED_LEN: usize = 60usize;
19396 fn deser(
19397 _version: MavlinkVersion,
19398 __input: &[u8],
19399 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19400 let avail_len = __input.len();
19401 let mut payload_buf = [0; Self::ENCODED_LEN];
19402 let mut buf = if avail_len < Self::ENCODED_LEN {
19403 payload_buf[0..avail_len].copy_from_slice(__input);
19404 Bytes::new(&payload_buf)
19405 } else {
19406 Bytes::new(__input)
19407 };
19408 let mut __struct = Self::default();
19409 __struct.time_usec = buf.get_u64_le()?;
19410 __struct.angle_x = buf.get_f32_le()?;
19411 __struct.angle_y = buf.get_f32_le()?;
19412 __struct.distance = buf.get_f32_le()?;
19413 __struct.size_x = buf.get_f32_le()?;
19414 __struct.size_y = buf.get_f32_le()?;
19415 __struct.target_num = buf.get_u8()?;
19416 let tmp = buf.get_u8()?;
19417 __struct.frame =
19418 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19419 enum_type: "MavFrame",
19420 value: tmp as u64,
19421 })?;
19422 __struct.x = buf.get_f32_le()?;
19423 __struct.y = buf.get_f32_le()?;
19424 __struct.z = buf.get_f32_le()?;
19425 for v in &mut __struct.q {
19426 let val = buf.get_f32_le()?;
19427 *v = val;
19428 }
19429 let tmp = buf.get_u8()?;
19430 __struct.mavtype =
19431 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19432 enum_type: "LandingTargetType",
19433 value: tmp as u64,
19434 })?;
19435 __struct.position_valid = buf.get_u8()?;
19436 Ok(__struct)
19437 }
19438 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19439 let mut __tmp = BytesMut::new(bytes);
19440 #[allow(clippy::absurd_extreme_comparisons)]
19441 #[allow(unused_comparisons)]
19442 if __tmp.remaining() < Self::ENCODED_LEN {
19443 panic!(
19444 "buffer is too small (need {} bytes, but got {})",
19445 Self::ENCODED_LEN,
19446 __tmp.remaining(),
19447 )
19448 }
19449 __tmp.put_u64_le(self.time_usec);
19450 __tmp.put_f32_le(self.angle_x);
19451 __tmp.put_f32_le(self.angle_y);
19452 __tmp.put_f32_le(self.distance);
19453 __tmp.put_f32_le(self.size_x);
19454 __tmp.put_f32_le(self.size_y);
19455 __tmp.put_u8(self.target_num);
19456 __tmp.put_u8(self.frame as u8);
19457 if matches!(version, MavlinkVersion::V2) {
19458 __tmp.put_f32_le(self.x);
19459 __tmp.put_f32_le(self.y);
19460 __tmp.put_f32_le(self.z);
19461 for val in &self.q {
19462 __tmp.put_f32_le(*val);
19463 }
19464 __tmp.put_u8(self.mavtype as u8);
19465 __tmp.put_u8(self.position_valid);
19466 let len = __tmp.len();
19467 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19468 } else {
19469 __tmp.len()
19470 }
19471 }
19472}
19473#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
19474#[doc = ""]
19475#[doc = "ID: 8"]
19476#[derive(Debug, Clone, PartialEq)]
19477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19479#[cfg_attr(feature = "ts", derive(TS))]
19480#[cfg_attr(feature = "ts", ts(export))]
19481pub struct LINK_NODE_STATUS_DATA {
19482 #[doc = "Timestamp (time since system boot)."]
19483 pub timestamp: u64,
19484 #[doc = "Transmit rate"]
19485 pub tx_rate: u32,
19486 #[doc = "Receive rate"]
19487 pub rx_rate: u32,
19488 #[doc = "Messages sent"]
19489 pub messages_sent: u32,
19490 #[doc = "Messages received (estimated from counting seq)"]
19491 pub messages_received: u32,
19492 #[doc = "Messages lost (estimated from counting seq)"]
19493 pub messages_lost: u32,
19494 #[doc = "Number of bytes that could not be parsed correctly."]
19495 pub rx_parse_err: u16,
19496 #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
19497 pub tx_overflows: u16,
19498 #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
19499 pub rx_overflows: u16,
19500 #[doc = "Remaining free transmit buffer space"]
19501 pub tx_buf: u8,
19502 #[doc = "Remaining free receive buffer space"]
19503 pub rx_buf: u8,
19504}
19505impl LINK_NODE_STATUS_DATA {
19506 pub const ENCODED_LEN: usize = 36usize;
19507 pub const DEFAULT: Self = Self {
19508 timestamp: 0_u64,
19509 tx_rate: 0_u32,
19510 rx_rate: 0_u32,
19511 messages_sent: 0_u32,
19512 messages_received: 0_u32,
19513 messages_lost: 0_u32,
19514 rx_parse_err: 0_u16,
19515 tx_overflows: 0_u16,
19516 rx_overflows: 0_u16,
19517 tx_buf: 0_u8,
19518 rx_buf: 0_u8,
19519 };
19520 #[cfg(feature = "arbitrary")]
19521 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19522 use arbitrary::{Arbitrary, Unstructured};
19523 let mut buf = [0u8; 1024];
19524 rng.fill_bytes(&mut buf);
19525 let mut unstructured = Unstructured::new(&buf);
19526 Self::arbitrary(&mut unstructured).unwrap_or_default()
19527 }
19528}
19529impl Default for LINK_NODE_STATUS_DATA {
19530 fn default() -> Self {
19531 Self::DEFAULT.clone()
19532 }
19533}
19534impl MessageData for LINK_NODE_STATUS_DATA {
19535 type Message = MavMessage;
19536 const ID: u32 = 8u32;
19537 const NAME: &'static str = "LINK_NODE_STATUS";
19538 const EXTRA_CRC: u8 = 117u8;
19539 const ENCODED_LEN: usize = 36usize;
19540 fn deser(
19541 _version: MavlinkVersion,
19542 __input: &[u8],
19543 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19544 let avail_len = __input.len();
19545 let mut payload_buf = [0; Self::ENCODED_LEN];
19546 let mut buf = if avail_len < Self::ENCODED_LEN {
19547 payload_buf[0..avail_len].copy_from_slice(__input);
19548 Bytes::new(&payload_buf)
19549 } else {
19550 Bytes::new(__input)
19551 };
19552 let mut __struct = Self::default();
19553 __struct.timestamp = buf.get_u64_le()?;
19554 __struct.tx_rate = buf.get_u32_le()?;
19555 __struct.rx_rate = buf.get_u32_le()?;
19556 __struct.messages_sent = buf.get_u32_le()?;
19557 __struct.messages_received = buf.get_u32_le()?;
19558 __struct.messages_lost = buf.get_u32_le()?;
19559 __struct.rx_parse_err = buf.get_u16_le()?;
19560 __struct.tx_overflows = buf.get_u16_le()?;
19561 __struct.rx_overflows = buf.get_u16_le()?;
19562 __struct.tx_buf = buf.get_u8()?;
19563 __struct.rx_buf = buf.get_u8()?;
19564 Ok(__struct)
19565 }
19566 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19567 let mut __tmp = BytesMut::new(bytes);
19568 #[allow(clippy::absurd_extreme_comparisons)]
19569 #[allow(unused_comparisons)]
19570 if __tmp.remaining() < Self::ENCODED_LEN {
19571 panic!(
19572 "buffer is too small (need {} bytes, but got {})",
19573 Self::ENCODED_LEN,
19574 __tmp.remaining(),
19575 )
19576 }
19577 __tmp.put_u64_le(self.timestamp);
19578 __tmp.put_u32_le(self.tx_rate);
19579 __tmp.put_u32_le(self.rx_rate);
19580 __tmp.put_u32_le(self.messages_sent);
19581 __tmp.put_u32_le(self.messages_received);
19582 __tmp.put_u32_le(self.messages_lost);
19583 __tmp.put_u16_le(self.rx_parse_err);
19584 __tmp.put_u16_le(self.tx_overflows);
19585 __tmp.put_u16_le(self.rx_overflows);
19586 __tmp.put_u8(self.tx_buf);
19587 __tmp.put_u8(self.rx_buf);
19588 if matches!(version, MavlinkVersion::V2) {
19589 let len = __tmp.len();
19590 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19591 } else {
19592 __tmp.len()
19593 }
19594 }
19595}
19596#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
19597#[doc = ""]
19598#[doc = "ID: 32"]
19599#[derive(Debug, Clone, PartialEq)]
19600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19602#[cfg_attr(feature = "ts", derive(TS))]
19603#[cfg_attr(feature = "ts", ts(export))]
19604pub struct LOCAL_POSITION_NED_DATA {
19605 #[doc = "Timestamp (time since system boot)."]
19606 pub time_boot_ms: u32,
19607 #[doc = "X Position"]
19608 pub x: f32,
19609 #[doc = "Y Position"]
19610 pub y: f32,
19611 #[doc = "Z Position"]
19612 pub z: f32,
19613 #[doc = "X Speed"]
19614 pub vx: f32,
19615 #[doc = "Y Speed"]
19616 pub vy: f32,
19617 #[doc = "Z Speed"]
19618 pub vz: f32,
19619}
19620impl LOCAL_POSITION_NED_DATA {
19621 pub const ENCODED_LEN: usize = 28usize;
19622 pub const DEFAULT: Self = Self {
19623 time_boot_ms: 0_u32,
19624 x: 0.0_f32,
19625 y: 0.0_f32,
19626 z: 0.0_f32,
19627 vx: 0.0_f32,
19628 vy: 0.0_f32,
19629 vz: 0.0_f32,
19630 };
19631 #[cfg(feature = "arbitrary")]
19632 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19633 use arbitrary::{Arbitrary, Unstructured};
19634 let mut buf = [0u8; 1024];
19635 rng.fill_bytes(&mut buf);
19636 let mut unstructured = Unstructured::new(&buf);
19637 Self::arbitrary(&mut unstructured).unwrap_or_default()
19638 }
19639}
19640impl Default for LOCAL_POSITION_NED_DATA {
19641 fn default() -> Self {
19642 Self::DEFAULT.clone()
19643 }
19644}
19645impl MessageData for LOCAL_POSITION_NED_DATA {
19646 type Message = MavMessage;
19647 const ID: u32 = 32u32;
19648 const NAME: &'static str = "LOCAL_POSITION_NED";
19649 const EXTRA_CRC: u8 = 185u8;
19650 const ENCODED_LEN: usize = 28usize;
19651 fn deser(
19652 _version: MavlinkVersion,
19653 __input: &[u8],
19654 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19655 let avail_len = __input.len();
19656 let mut payload_buf = [0; Self::ENCODED_LEN];
19657 let mut buf = if avail_len < Self::ENCODED_LEN {
19658 payload_buf[0..avail_len].copy_from_slice(__input);
19659 Bytes::new(&payload_buf)
19660 } else {
19661 Bytes::new(__input)
19662 };
19663 let mut __struct = Self::default();
19664 __struct.time_boot_ms = buf.get_u32_le()?;
19665 __struct.x = buf.get_f32_le()?;
19666 __struct.y = buf.get_f32_le()?;
19667 __struct.z = buf.get_f32_le()?;
19668 __struct.vx = buf.get_f32_le()?;
19669 __struct.vy = buf.get_f32_le()?;
19670 __struct.vz = buf.get_f32_le()?;
19671 Ok(__struct)
19672 }
19673 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19674 let mut __tmp = BytesMut::new(bytes);
19675 #[allow(clippy::absurd_extreme_comparisons)]
19676 #[allow(unused_comparisons)]
19677 if __tmp.remaining() < Self::ENCODED_LEN {
19678 panic!(
19679 "buffer is too small (need {} bytes, but got {})",
19680 Self::ENCODED_LEN,
19681 __tmp.remaining(),
19682 )
19683 }
19684 __tmp.put_u32_le(self.time_boot_ms);
19685 __tmp.put_f32_le(self.x);
19686 __tmp.put_f32_le(self.y);
19687 __tmp.put_f32_le(self.z);
19688 __tmp.put_f32_le(self.vx);
19689 __tmp.put_f32_le(self.vy);
19690 __tmp.put_f32_le(self.vz);
19691 if matches!(version, MavlinkVersion::V2) {
19692 let len = __tmp.len();
19693 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19694 } else {
19695 __tmp.len()
19696 }
19697 }
19698}
19699#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
19700#[doc = ""]
19701#[doc = "ID: 64"]
19702#[derive(Debug, Clone, PartialEq)]
19703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19705#[cfg_attr(feature = "ts", derive(TS))]
19706#[cfg_attr(feature = "ts", ts(export))]
19707pub struct LOCAL_POSITION_NED_COV_DATA {
19708 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19709 pub time_usec: u64,
19710 #[doc = "X Position"]
19711 pub x: f32,
19712 #[doc = "Y Position"]
19713 pub y: f32,
19714 #[doc = "Z Position"]
19715 pub z: f32,
19716 #[doc = "X Speed"]
19717 pub vx: f32,
19718 #[doc = "Y Speed"]
19719 pub vy: f32,
19720 #[doc = "Z Speed"]
19721 pub vz: f32,
19722 #[doc = "X Acceleration"]
19723 pub ax: f32,
19724 #[doc = "Y Acceleration"]
19725 pub ay: f32,
19726 #[doc = "Z Acceleration"]
19727 pub az: f32,
19728 #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
19729 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19730 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19731 pub covariance: [f32; 45],
19732 #[doc = "Class id of the estimator this estimate originated from."]
19733 pub estimator_type: MavEstimatorType,
19734}
19735impl LOCAL_POSITION_NED_COV_DATA {
19736 pub const ENCODED_LEN: usize = 225usize;
19737 pub const DEFAULT: Self = Self {
19738 time_usec: 0_u64,
19739 x: 0.0_f32,
19740 y: 0.0_f32,
19741 z: 0.0_f32,
19742 vx: 0.0_f32,
19743 vy: 0.0_f32,
19744 vz: 0.0_f32,
19745 ax: 0.0_f32,
19746 ay: 0.0_f32,
19747 az: 0.0_f32,
19748 covariance: [0.0_f32; 45usize],
19749 estimator_type: MavEstimatorType::DEFAULT,
19750 };
19751 #[cfg(feature = "arbitrary")]
19752 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19753 use arbitrary::{Arbitrary, Unstructured};
19754 let mut buf = [0u8; 1024];
19755 rng.fill_bytes(&mut buf);
19756 let mut unstructured = Unstructured::new(&buf);
19757 Self::arbitrary(&mut unstructured).unwrap_or_default()
19758 }
19759}
19760impl Default for LOCAL_POSITION_NED_COV_DATA {
19761 fn default() -> Self {
19762 Self::DEFAULT.clone()
19763 }
19764}
19765impl MessageData for LOCAL_POSITION_NED_COV_DATA {
19766 type Message = MavMessage;
19767 const ID: u32 = 64u32;
19768 const NAME: &'static str = "LOCAL_POSITION_NED_COV";
19769 const EXTRA_CRC: u8 = 191u8;
19770 const ENCODED_LEN: usize = 225usize;
19771 fn deser(
19772 _version: MavlinkVersion,
19773 __input: &[u8],
19774 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19775 let avail_len = __input.len();
19776 let mut payload_buf = [0; Self::ENCODED_LEN];
19777 let mut buf = if avail_len < Self::ENCODED_LEN {
19778 payload_buf[0..avail_len].copy_from_slice(__input);
19779 Bytes::new(&payload_buf)
19780 } else {
19781 Bytes::new(__input)
19782 };
19783 let mut __struct = Self::default();
19784 __struct.time_usec = buf.get_u64_le()?;
19785 __struct.x = buf.get_f32_le()?;
19786 __struct.y = buf.get_f32_le()?;
19787 __struct.z = buf.get_f32_le()?;
19788 __struct.vx = buf.get_f32_le()?;
19789 __struct.vy = buf.get_f32_le()?;
19790 __struct.vz = buf.get_f32_le()?;
19791 __struct.ax = buf.get_f32_le()?;
19792 __struct.ay = buf.get_f32_le()?;
19793 __struct.az = buf.get_f32_le()?;
19794 for v in &mut __struct.covariance {
19795 let val = buf.get_f32_le()?;
19796 *v = val;
19797 }
19798 let tmp = buf.get_u8()?;
19799 __struct.estimator_type =
19800 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19801 enum_type: "MavEstimatorType",
19802 value: tmp as u64,
19803 })?;
19804 Ok(__struct)
19805 }
19806 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19807 let mut __tmp = BytesMut::new(bytes);
19808 #[allow(clippy::absurd_extreme_comparisons)]
19809 #[allow(unused_comparisons)]
19810 if __tmp.remaining() < Self::ENCODED_LEN {
19811 panic!(
19812 "buffer is too small (need {} bytes, but got {})",
19813 Self::ENCODED_LEN,
19814 __tmp.remaining(),
19815 )
19816 }
19817 __tmp.put_u64_le(self.time_usec);
19818 __tmp.put_f32_le(self.x);
19819 __tmp.put_f32_le(self.y);
19820 __tmp.put_f32_le(self.z);
19821 __tmp.put_f32_le(self.vx);
19822 __tmp.put_f32_le(self.vy);
19823 __tmp.put_f32_le(self.vz);
19824 __tmp.put_f32_le(self.ax);
19825 __tmp.put_f32_le(self.ay);
19826 __tmp.put_f32_le(self.az);
19827 for val in &self.covariance {
19828 __tmp.put_f32_le(*val);
19829 }
19830 __tmp.put_u8(self.estimator_type as u8);
19831 if matches!(version, MavlinkVersion::V2) {
19832 let len = __tmp.len();
19833 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19834 } else {
19835 __tmp.len()
19836 }
19837 }
19838}
19839#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
19840#[doc = ""]
19841#[doc = "ID: 89"]
19842#[derive(Debug, Clone, PartialEq)]
19843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19845#[cfg_attr(feature = "ts", derive(TS))]
19846#[cfg_attr(feature = "ts", ts(export))]
19847pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
19848 #[doc = "Timestamp (time since system boot)."]
19849 pub time_boot_ms: u32,
19850 #[doc = "X Position"]
19851 pub x: f32,
19852 #[doc = "Y Position"]
19853 pub y: f32,
19854 #[doc = "Z Position"]
19855 pub z: f32,
19856 #[doc = "Roll"]
19857 pub roll: f32,
19858 #[doc = "Pitch"]
19859 pub pitch: f32,
19860 #[doc = "Yaw"]
19861 pub yaw: f32,
19862}
19863impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
19864 pub const ENCODED_LEN: usize = 28usize;
19865 pub const DEFAULT: Self = Self {
19866 time_boot_ms: 0_u32,
19867 x: 0.0_f32,
19868 y: 0.0_f32,
19869 z: 0.0_f32,
19870 roll: 0.0_f32,
19871 pitch: 0.0_f32,
19872 yaw: 0.0_f32,
19873 };
19874 #[cfg(feature = "arbitrary")]
19875 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19876 use arbitrary::{Arbitrary, Unstructured};
19877 let mut buf = [0u8; 1024];
19878 rng.fill_bytes(&mut buf);
19879 let mut unstructured = Unstructured::new(&buf);
19880 Self::arbitrary(&mut unstructured).unwrap_or_default()
19881 }
19882}
19883impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
19884 fn default() -> Self {
19885 Self::DEFAULT.clone()
19886 }
19887}
19888impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
19889 type Message = MavMessage;
19890 const ID: u32 = 89u32;
19891 const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
19892 const EXTRA_CRC: u8 = 231u8;
19893 const ENCODED_LEN: usize = 28usize;
19894 fn deser(
19895 _version: MavlinkVersion,
19896 __input: &[u8],
19897 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19898 let avail_len = __input.len();
19899 let mut payload_buf = [0; Self::ENCODED_LEN];
19900 let mut buf = if avail_len < Self::ENCODED_LEN {
19901 payload_buf[0..avail_len].copy_from_slice(__input);
19902 Bytes::new(&payload_buf)
19903 } else {
19904 Bytes::new(__input)
19905 };
19906 let mut __struct = Self::default();
19907 __struct.time_boot_ms = buf.get_u32_le()?;
19908 __struct.x = buf.get_f32_le()?;
19909 __struct.y = buf.get_f32_le()?;
19910 __struct.z = buf.get_f32_le()?;
19911 __struct.roll = buf.get_f32_le()?;
19912 __struct.pitch = buf.get_f32_le()?;
19913 __struct.yaw = buf.get_f32_le()?;
19914 Ok(__struct)
19915 }
19916 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19917 let mut __tmp = BytesMut::new(bytes);
19918 #[allow(clippy::absurd_extreme_comparisons)]
19919 #[allow(unused_comparisons)]
19920 if __tmp.remaining() < Self::ENCODED_LEN {
19921 panic!(
19922 "buffer is too small (need {} bytes, but got {})",
19923 Self::ENCODED_LEN,
19924 __tmp.remaining(),
19925 )
19926 }
19927 __tmp.put_u32_le(self.time_boot_ms);
19928 __tmp.put_f32_le(self.x);
19929 __tmp.put_f32_le(self.y);
19930 __tmp.put_f32_le(self.z);
19931 __tmp.put_f32_le(self.roll);
19932 __tmp.put_f32_le(self.pitch);
19933 __tmp.put_f32_le(self.yaw);
19934 if matches!(version, MavlinkVersion::V2) {
19935 let len = __tmp.len();
19936 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19937 } else {
19938 __tmp.len()
19939 }
19940 }
19941}
19942#[doc = "An ack for a LOGGING_DATA_ACKED message."]
19943#[doc = ""]
19944#[doc = "ID: 268"]
19945#[derive(Debug, Clone, PartialEq)]
19946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19948#[cfg_attr(feature = "ts", derive(TS))]
19949#[cfg_attr(feature = "ts", ts(export))]
19950pub struct LOGGING_ACK_DATA {
19951 #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
19952 pub sequence: u16,
19953 #[doc = "system ID of the target"]
19954 pub target_system: u8,
19955 #[doc = "component ID of the target"]
19956 pub target_component: u8,
19957}
19958impl LOGGING_ACK_DATA {
19959 pub const ENCODED_LEN: usize = 4usize;
19960 pub const DEFAULT: Self = Self {
19961 sequence: 0_u16,
19962 target_system: 0_u8,
19963 target_component: 0_u8,
19964 };
19965 #[cfg(feature = "arbitrary")]
19966 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19967 use arbitrary::{Arbitrary, Unstructured};
19968 let mut buf = [0u8; 1024];
19969 rng.fill_bytes(&mut buf);
19970 let mut unstructured = Unstructured::new(&buf);
19971 Self::arbitrary(&mut unstructured).unwrap_or_default()
19972 }
19973}
19974impl Default for LOGGING_ACK_DATA {
19975 fn default() -> Self {
19976 Self::DEFAULT.clone()
19977 }
19978}
19979impl MessageData for LOGGING_ACK_DATA {
19980 type Message = MavMessage;
19981 const ID: u32 = 268u32;
19982 const NAME: &'static str = "LOGGING_ACK";
19983 const EXTRA_CRC: u8 = 14u8;
19984 const ENCODED_LEN: usize = 4usize;
19985 fn deser(
19986 _version: MavlinkVersion,
19987 __input: &[u8],
19988 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19989 let avail_len = __input.len();
19990 let mut payload_buf = [0; Self::ENCODED_LEN];
19991 let mut buf = if avail_len < Self::ENCODED_LEN {
19992 payload_buf[0..avail_len].copy_from_slice(__input);
19993 Bytes::new(&payload_buf)
19994 } else {
19995 Bytes::new(__input)
19996 };
19997 let mut __struct = Self::default();
19998 __struct.sequence = buf.get_u16_le()?;
19999 __struct.target_system = buf.get_u8()?;
20000 __struct.target_component = buf.get_u8()?;
20001 Ok(__struct)
20002 }
20003 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20004 let mut __tmp = BytesMut::new(bytes);
20005 #[allow(clippy::absurd_extreme_comparisons)]
20006 #[allow(unused_comparisons)]
20007 if __tmp.remaining() < Self::ENCODED_LEN {
20008 panic!(
20009 "buffer is too small (need {} bytes, but got {})",
20010 Self::ENCODED_LEN,
20011 __tmp.remaining(),
20012 )
20013 }
20014 __tmp.put_u16_le(self.sequence);
20015 __tmp.put_u8(self.target_system);
20016 __tmp.put_u8(self.target_component);
20017 if matches!(version, MavlinkVersion::V2) {
20018 let len = __tmp.len();
20019 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20020 } else {
20021 __tmp.len()
20022 }
20023 }
20024}
20025#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
20026#[doc = ""]
20027#[doc = "ID: 266"]
20028#[derive(Debug, Clone, PartialEq)]
20029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20031#[cfg_attr(feature = "ts", derive(TS))]
20032#[cfg_attr(feature = "ts", ts(export))]
20033pub struct LOGGING_DATA_DATA {
20034 #[doc = "sequence number (can wrap)"]
20035 pub sequence: u16,
20036 #[doc = "system ID of the target"]
20037 pub target_system: u8,
20038 #[doc = "component ID of the target"]
20039 pub target_component: u8,
20040 #[doc = "data length"]
20041 pub length: u8,
20042 #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
20043 pub first_message_offset: u8,
20044 #[doc = "logged data"]
20045 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20046 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20047 pub data: [u8; 249],
20048}
20049impl LOGGING_DATA_DATA {
20050 pub const ENCODED_LEN: usize = 255usize;
20051 pub const DEFAULT: Self = Self {
20052 sequence: 0_u16,
20053 target_system: 0_u8,
20054 target_component: 0_u8,
20055 length: 0_u8,
20056 first_message_offset: 0_u8,
20057 data: [0_u8; 249usize],
20058 };
20059 #[cfg(feature = "arbitrary")]
20060 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20061 use arbitrary::{Arbitrary, Unstructured};
20062 let mut buf = [0u8; 1024];
20063 rng.fill_bytes(&mut buf);
20064 let mut unstructured = Unstructured::new(&buf);
20065 Self::arbitrary(&mut unstructured).unwrap_or_default()
20066 }
20067}
20068impl Default for LOGGING_DATA_DATA {
20069 fn default() -> Self {
20070 Self::DEFAULT.clone()
20071 }
20072}
20073impl MessageData for LOGGING_DATA_DATA {
20074 type Message = MavMessage;
20075 const ID: u32 = 266u32;
20076 const NAME: &'static str = "LOGGING_DATA";
20077 const EXTRA_CRC: u8 = 193u8;
20078 const ENCODED_LEN: usize = 255usize;
20079 fn deser(
20080 _version: MavlinkVersion,
20081 __input: &[u8],
20082 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20083 let avail_len = __input.len();
20084 let mut payload_buf = [0; Self::ENCODED_LEN];
20085 let mut buf = if avail_len < Self::ENCODED_LEN {
20086 payload_buf[0..avail_len].copy_from_slice(__input);
20087 Bytes::new(&payload_buf)
20088 } else {
20089 Bytes::new(__input)
20090 };
20091 let mut __struct = Self::default();
20092 __struct.sequence = buf.get_u16_le()?;
20093 __struct.target_system = buf.get_u8()?;
20094 __struct.target_component = buf.get_u8()?;
20095 __struct.length = buf.get_u8()?;
20096 __struct.first_message_offset = buf.get_u8()?;
20097 for v in &mut __struct.data {
20098 let val = buf.get_u8()?;
20099 *v = val;
20100 }
20101 Ok(__struct)
20102 }
20103 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20104 let mut __tmp = BytesMut::new(bytes);
20105 #[allow(clippy::absurd_extreme_comparisons)]
20106 #[allow(unused_comparisons)]
20107 if __tmp.remaining() < Self::ENCODED_LEN {
20108 panic!(
20109 "buffer is too small (need {} bytes, but got {})",
20110 Self::ENCODED_LEN,
20111 __tmp.remaining(),
20112 )
20113 }
20114 __tmp.put_u16_le(self.sequence);
20115 __tmp.put_u8(self.target_system);
20116 __tmp.put_u8(self.target_component);
20117 __tmp.put_u8(self.length);
20118 __tmp.put_u8(self.first_message_offset);
20119 for val in &self.data {
20120 __tmp.put_u8(*val);
20121 }
20122 if matches!(version, MavlinkVersion::V2) {
20123 let len = __tmp.len();
20124 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20125 } else {
20126 __tmp.len()
20127 }
20128 }
20129}
20130#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
20131#[doc = ""]
20132#[doc = "ID: 267"]
20133#[derive(Debug, Clone, PartialEq)]
20134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20136#[cfg_attr(feature = "ts", derive(TS))]
20137#[cfg_attr(feature = "ts", ts(export))]
20138pub struct LOGGING_DATA_ACKED_DATA {
20139 #[doc = "sequence number (can wrap)"]
20140 pub sequence: u16,
20141 #[doc = "system ID of the target"]
20142 pub target_system: u8,
20143 #[doc = "component ID of the target"]
20144 pub target_component: u8,
20145 #[doc = "data length"]
20146 pub length: u8,
20147 #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
20148 pub first_message_offset: u8,
20149 #[doc = "logged data"]
20150 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20151 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20152 pub data: [u8; 249],
20153}
20154impl LOGGING_DATA_ACKED_DATA {
20155 pub const ENCODED_LEN: usize = 255usize;
20156 pub const DEFAULT: Self = Self {
20157 sequence: 0_u16,
20158 target_system: 0_u8,
20159 target_component: 0_u8,
20160 length: 0_u8,
20161 first_message_offset: 0_u8,
20162 data: [0_u8; 249usize],
20163 };
20164 #[cfg(feature = "arbitrary")]
20165 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20166 use arbitrary::{Arbitrary, Unstructured};
20167 let mut buf = [0u8; 1024];
20168 rng.fill_bytes(&mut buf);
20169 let mut unstructured = Unstructured::new(&buf);
20170 Self::arbitrary(&mut unstructured).unwrap_or_default()
20171 }
20172}
20173impl Default for LOGGING_DATA_ACKED_DATA {
20174 fn default() -> Self {
20175 Self::DEFAULT.clone()
20176 }
20177}
20178impl MessageData for LOGGING_DATA_ACKED_DATA {
20179 type Message = MavMessage;
20180 const ID: u32 = 267u32;
20181 const NAME: &'static str = "LOGGING_DATA_ACKED";
20182 const EXTRA_CRC: u8 = 35u8;
20183 const ENCODED_LEN: usize = 255usize;
20184 fn deser(
20185 _version: MavlinkVersion,
20186 __input: &[u8],
20187 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20188 let avail_len = __input.len();
20189 let mut payload_buf = [0; Self::ENCODED_LEN];
20190 let mut buf = if avail_len < Self::ENCODED_LEN {
20191 payload_buf[0..avail_len].copy_from_slice(__input);
20192 Bytes::new(&payload_buf)
20193 } else {
20194 Bytes::new(__input)
20195 };
20196 let mut __struct = Self::default();
20197 __struct.sequence = buf.get_u16_le()?;
20198 __struct.target_system = buf.get_u8()?;
20199 __struct.target_component = buf.get_u8()?;
20200 __struct.length = buf.get_u8()?;
20201 __struct.first_message_offset = buf.get_u8()?;
20202 for v in &mut __struct.data {
20203 let val = buf.get_u8()?;
20204 *v = val;
20205 }
20206 Ok(__struct)
20207 }
20208 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20209 let mut __tmp = BytesMut::new(bytes);
20210 #[allow(clippy::absurd_extreme_comparisons)]
20211 #[allow(unused_comparisons)]
20212 if __tmp.remaining() < Self::ENCODED_LEN {
20213 panic!(
20214 "buffer is too small (need {} bytes, but got {})",
20215 Self::ENCODED_LEN,
20216 __tmp.remaining(),
20217 )
20218 }
20219 __tmp.put_u16_le(self.sequence);
20220 __tmp.put_u8(self.target_system);
20221 __tmp.put_u8(self.target_component);
20222 __tmp.put_u8(self.length);
20223 __tmp.put_u8(self.first_message_offset);
20224 for val in &self.data {
20225 __tmp.put_u8(*val);
20226 }
20227 if matches!(version, MavlinkVersion::V2) {
20228 let len = __tmp.len();
20229 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20230 } else {
20231 __tmp.len()
20232 }
20233 }
20234}
20235#[doc = "Reply to LOG_REQUEST_DATA."]
20236#[doc = ""]
20237#[doc = "ID: 120"]
20238#[derive(Debug, Clone, PartialEq)]
20239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20241#[cfg_attr(feature = "ts", derive(TS))]
20242#[cfg_attr(feature = "ts", ts(export))]
20243pub struct LOG_DATA_DATA {
20244 #[doc = "Offset into the log"]
20245 pub ofs: u32,
20246 #[doc = "Log id (from LOG_ENTRY reply)"]
20247 pub id: u16,
20248 #[doc = "Number of bytes (zero for end of log)"]
20249 pub count: u8,
20250 #[doc = "log data"]
20251 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20252 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20253 pub data: [u8; 90],
20254}
20255impl LOG_DATA_DATA {
20256 pub const ENCODED_LEN: usize = 97usize;
20257 pub const DEFAULT: Self = Self {
20258 ofs: 0_u32,
20259 id: 0_u16,
20260 count: 0_u8,
20261 data: [0_u8; 90usize],
20262 };
20263 #[cfg(feature = "arbitrary")]
20264 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20265 use arbitrary::{Arbitrary, Unstructured};
20266 let mut buf = [0u8; 1024];
20267 rng.fill_bytes(&mut buf);
20268 let mut unstructured = Unstructured::new(&buf);
20269 Self::arbitrary(&mut unstructured).unwrap_or_default()
20270 }
20271}
20272impl Default for LOG_DATA_DATA {
20273 fn default() -> Self {
20274 Self::DEFAULT.clone()
20275 }
20276}
20277impl MessageData for LOG_DATA_DATA {
20278 type Message = MavMessage;
20279 const ID: u32 = 120u32;
20280 const NAME: &'static str = "LOG_DATA";
20281 const EXTRA_CRC: u8 = 134u8;
20282 const ENCODED_LEN: usize = 97usize;
20283 fn deser(
20284 _version: MavlinkVersion,
20285 __input: &[u8],
20286 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20287 let avail_len = __input.len();
20288 let mut payload_buf = [0; Self::ENCODED_LEN];
20289 let mut buf = if avail_len < Self::ENCODED_LEN {
20290 payload_buf[0..avail_len].copy_from_slice(__input);
20291 Bytes::new(&payload_buf)
20292 } else {
20293 Bytes::new(__input)
20294 };
20295 let mut __struct = Self::default();
20296 __struct.ofs = buf.get_u32_le()?;
20297 __struct.id = buf.get_u16_le()?;
20298 __struct.count = buf.get_u8()?;
20299 for v in &mut __struct.data {
20300 let val = buf.get_u8()?;
20301 *v = val;
20302 }
20303 Ok(__struct)
20304 }
20305 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20306 let mut __tmp = BytesMut::new(bytes);
20307 #[allow(clippy::absurd_extreme_comparisons)]
20308 #[allow(unused_comparisons)]
20309 if __tmp.remaining() < Self::ENCODED_LEN {
20310 panic!(
20311 "buffer is too small (need {} bytes, but got {})",
20312 Self::ENCODED_LEN,
20313 __tmp.remaining(),
20314 )
20315 }
20316 __tmp.put_u32_le(self.ofs);
20317 __tmp.put_u16_le(self.id);
20318 __tmp.put_u8(self.count);
20319 for val in &self.data {
20320 __tmp.put_u8(*val);
20321 }
20322 if matches!(version, MavlinkVersion::V2) {
20323 let len = __tmp.len();
20324 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20325 } else {
20326 __tmp.len()
20327 }
20328 }
20329}
20330#[doc = "Reply to LOG_REQUEST_LIST."]
20331#[doc = ""]
20332#[doc = "ID: 118"]
20333#[derive(Debug, Clone, PartialEq)]
20334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20336#[cfg_attr(feature = "ts", derive(TS))]
20337#[cfg_attr(feature = "ts", ts(export))]
20338pub struct LOG_ENTRY_DATA {
20339 #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
20340 pub time_utc: u32,
20341 #[doc = "Size of the log (may be approximate)"]
20342 pub size: u32,
20343 #[doc = "Log id"]
20344 pub id: u16,
20345 #[doc = "Total number of logs"]
20346 pub num_logs: u16,
20347 #[doc = "High log number"]
20348 pub last_log_num: u16,
20349}
20350impl LOG_ENTRY_DATA {
20351 pub const ENCODED_LEN: usize = 14usize;
20352 pub const DEFAULT: Self = Self {
20353 time_utc: 0_u32,
20354 size: 0_u32,
20355 id: 0_u16,
20356 num_logs: 0_u16,
20357 last_log_num: 0_u16,
20358 };
20359 #[cfg(feature = "arbitrary")]
20360 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20361 use arbitrary::{Arbitrary, Unstructured};
20362 let mut buf = [0u8; 1024];
20363 rng.fill_bytes(&mut buf);
20364 let mut unstructured = Unstructured::new(&buf);
20365 Self::arbitrary(&mut unstructured).unwrap_or_default()
20366 }
20367}
20368impl Default for LOG_ENTRY_DATA {
20369 fn default() -> Self {
20370 Self::DEFAULT.clone()
20371 }
20372}
20373impl MessageData for LOG_ENTRY_DATA {
20374 type Message = MavMessage;
20375 const ID: u32 = 118u32;
20376 const NAME: &'static str = "LOG_ENTRY";
20377 const EXTRA_CRC: u8 = 56u8;
20378 const ENCODED_LEN: usize = 14usize;
20379 fn deser(
20380 _version: MavlinkVersion,
20381 __input: &[u8],
20382 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20383 let avail_len = __input.len();
20384 let mut payload_buf = [0; Self::ENCODED_LEN];
20385 let mut buf = if avail_len < Self::ENCODED_LEN {
20386 payload_buf[0..avail_len].copy_from_slice(__input);
20387 Bytes::new(&payload_buf)
20388 } else {
20389 Bytes::new(__input)
20390 };
20391 let mut __struct = Self::default();
20392 __struct.time_utc = buf.get_u32_le()?;
20393 __struct.size = buf.get_u32_le()?;
20394 __struct.id = buf.get_u16_le()?;
20395 __struct.num_logs = buf.get_u16_le()?;
20396 __struct.last_log_num = buf.get_u16_le()?;
20397 Ok(__struct)
20398 }
20399 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20400 let mut __tmp = BytesMut::new(bytes);
20401 #[allow(clippy::absurd_extreme_comparisons)]
20402 #[allow(unused_comparisons)]
20403 if __tmp.remaining() < Self::ENCODED_LEN {
20404 panic!(
20405 "buffer is too small (need {} bytes, but got {})",
20406 Self::ENCODED_LEN,
20407 __tmp.remaining(),
20408 )
20409 }
20410 __tmp.put_u32_le(self.time_utc);
20411 __tmp.put_u32_le(self.size);
20412 __tmp.put_u16_le(self.id);
20413 __tmp.put_u16_le(self.num_logs);
20414 __tmp.put_u16_le(self.last_log_num);
20415 if matches!(version, MavlinkVersion::V2) {
20416 let len = __tmp.len();
20417 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20418 } else {
20419 __tmp.len()
20420 }
20421 }
20422}
20423#[doc = "Erase all logs."]
20424#[doc = ""]
20425#[doc = "ID: 121"]
20426#[derive(Debug, Clone, PartialEq)]
20427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20429#[cfg_attr(feature = "ts", derive(TS))]
20430#[cfg_attr(feature = "ts", ts(export))]
20431pub struct LOG_ERASE_DATA {
20432 #[doc = "System ID"]
20433 pub target_system: u8,
20434 #[doc = "Component ID"]
20435 pub target_component: u8,
20436}
20437impl LOG_ERASE_DATA {
20438 pub const ENCODED_LEN: usize = 2usize;
20439 pub const DEFAULT: Self = Self {
20440 target_system: 0_u8,
20441 target_component: 0_u8,
20442 };
20443 #[cfg(feature = "arbitrary")]
20444 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20445 use arbitrary::{Arbitrary, Unstructured};
20446 let mut buf = [0u8; 1024];
20447 rng.fill_bytes(&mut buf);
20448 let mut unstructured = Unstructured::new(&buf);
20449 Self::arbitrary(&mut unstructured).unwrap_or_default()
20450 }
20451}
20452impl Default for LOG_ERASE_DATA {
20453 fn default() -> Self {
20454 Self::DEFAULT.clone()
20455 }
20456}
20457impl MessageData for LOG_ERASE_DATA {
20458 type Message = MavMessage;
20459 const ID: u32 = 121u32;
20460 const NAME: &'static str = "LOG_ERASE";
20461 const EXTRA_CRC: u8 = 237u8;
20462 const ENCODED_LEN: usize = 2usize;
20463 fn deser(
20464 _version: MavlinkVersion,
20465 __input: &[u8],
20466 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20467 let avail_len = __input.len();
20468 let mut payload_buf = [0; Self::ENCODED_LEN];
20469 let mut buf = if avail_len < Self::ENCODED_LEN {
20470 payload_buf[0..avail_len].copy_from_slice(__input);
20471 Bytes::new(&payload_buf)
20472 } else {
20473 Bytes::new(__input)
20474 };
20475 let mut __struct = Self::default();
20476 __struct.target_system = buf.get_u8()?;
20477 __struct.target_component = buf.get_u8()?;
20478 Ok(__struct)
20479 }
20480 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20481 let mut __tmp = BytesMut::new(bytes);
20482 #[allow(clippy::absurd_extreme_comparisons)]
20483 #[allow(unused_comparisons)]
20484 if __tmp.remaining() < Self::ENCODED_LEN {
20485 panic!(
20486 "buffer is too small (need {} bytes, but got {})",
20487 Self::ENCODED_LEN,
20488 __tmp.remaining(),
20489 )
20490 }
20491 __tmp.put_u8(self.target_system);
20492 __tmp.put_u8(self.target_component);
20493 if matches!(version, MavlinkVersion::V2) {
20494 let len = __tmp.len();
20495 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20496 } else {
20497 __tmp.len()
20498 }
20499 }
20500}
20501#[doc = "Request a chunk of a log."]
20502#[doc = ""]
20503#[doc = "ID: 119"]
20504#[derive(Debug, Clone, PartialEq)]
20505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20507#[cfg_attr(feature = "ts", derive(TS))]
20508#[cfg_attr(feature = "ts", ts(export))]
20509pub struct LOG_REQUEST_DATA_DATA {
20510 #[doc = "Offset into the log"]
20511 pub ofs: u32,
20512 #[doc = "Number of bytes"]
20513 pub count: u32,
20514 #[doc = "Log id (from LOG_ENTRY reply)"]
20515 pub id: u16,
20516 #[doc = "System ID"]
20517 pub target_system: u8,
20518 #[doc = "Component ID"]
20519 pub target_component: u8,
20520}
20521impl LOG_REQUEST_DATA_DATA {
20522 pub const ENCODED_LEN: usize = 12usize;
20523 pub const DEFAULT: Self = Self {
20524 ofs: 0_u32,
20525 count: 0_u32,
20526 id: 0_u16,
20527 target_system: 0_u8,
20528 target_component: 0_u8,
20529 };
20530 #[cfg(feature = "arbitrary")]
20531 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20532 use arbitrary::{Arbitrary, Unstructured};
20533 let mut buf = [0u8; 1024];
20534 rng.fill_bytes(&mut buf);
20535 let mut unstructured = Unstructured::new(&buf);
20536 Self::arbitrary(&mut unstructured).unwrap_or_default()
20537 }
20538}
20539impl Default for LOG_REQUEST_DATA_DATA {
20540 fn default() -> Self {
20541 Self::DEFAULT.clone()
20542 }
20543}
20544impl MessageData for LOG_REQUEST_DATA_DATA {
20545 type Message = MavMessage;
20546 const ID: u32 = 119u32;
20547 const NAME: &'static str = "LOG_REQUEST_DATA";
20548 const EXTRA_CRC: u8 = 116u8;
20549 const ENCODED_LEN: usize = 12usize;
20550 fn deser(
20551 _version: MavlinkVersion,
20552 __input: &[u8],
20553 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20554 let avail_len = __input.len();
20555 let mut payload_buf = [0; Self::ENCODED_LEN];
20556 let mut buf = if avail_len < Self::ENCODED_LEN {
20557 payload_buf[0..avail_len].copy_from_slice(__input);
20558 Bytes::new(&payload_buf)
20559 } else {
20560 Bytes::new(__input)
20561 };
20562 let mut __struct = Self::default();
20563 __struct.ofs = buf.get_u32_le()?;
20564 __struct.count = buf.get_u32_le()?;
20565 __struct.id = buf.get_u16_le()?;
20566 __struct.target_system = buf.get_u8()?;
20567 __struct.target_component = buf.get_u8()?;
20568 Ok(__struct)
20569 }
20570 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20571 let mut __tmp = BytesMut::new(bytes);
20572 #[allow(clippy::absurd_extreme_comparisons)]
20573 #[allow(unused_comparisons)]
20574 if __tmp.remaining() < Self::ENCODED_LEN {
20575 panic!(
20576 "buffer is too small (need {} bytes, but got {})",
20577 Self::ENCODED_LEN,
20578 __tmp.remaining(),
20579 )
20580 }
20581 __tmp.put_u32_le(self.ofs);
20582 __tmp.put_u32_le(self.count);
20583 __tmp.put_u16_le(self.id);
20584 __tmp.put_u8(self.target_system);
20585 __tmp.put_u8(self.target_component);
20586 if matches!(version, MavlinkVersion::V2) {
20587 let len = __tmp.len();
20588 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20589 } else {
20590 __tmp.len()
20591 }
20592 }
20593}
20594#[doc = "Stop log transfer and resume normal logging."]
20595#[doc = ""]
20596#[doc = "ID: 122"]
20597#[derive(Debug, Clone, PartialEq)]
20598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20600#[cfg_attr(feature = "ts", derive(TS))]
20601#[cfg_attr(feature = "ts", ts(export))]
20602pub struct LOG_REQUEST_END_DATA {
20603 #[doc = "System ID"]
20604 pub target_system: u8,
20605 #[doc = "Component ID"]
20606 pub target_component: u8,
20607}
20608impl LOG_REQUEST_END_DATA {
20609 pub const ENCODED_LEN: usize = 2usize;
20610 pub const DEFAULT: Self = Self {
20611 target_system: 0_u8,
20612 target_component: 0_u8,
20613 };
20614 #[cfg(feature = "arbitrary")]
20615 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20616 use arbitrary::{Arbitrary, Unstructured};
20617 let mut buf = [0u8; 1024];
20618 rng.fill_bytes(&mut buf);
20619 let mut unstructured = Unstructured::new(&buf);
20620 Self::arbitrary(&mut unstructured).unwrap_or_default()
20621 }
20622}
20623impl Default for LOG_REQUEST_END_DATA {
20624 fn default() -> Self {
20625 Self::DEFAULT.clone()
20626 }
20627}
20628impl MessageData for LOG_REQUEST_END_DATA {
20629 type Message = MavMessage;
20630 const ID: u32 = 122u32;
20631 const NAME: &'static str = "LOG_REQUEST_END";
20632 const EXTRA_CRC: u8 = 203u8;
20633 const ENCODED_LEN: usize = 2usize;
20634 fn deser(
20635 _version: MavlinkVersion,
20636 __input: &[u8],
20637 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20638 let avail_len = __input.len();
20639 let mut payload_buf = [0; Self::ENCODED_LEN];
20640 let mut buf = if avail_len < Self::ENCODED_LEN {
20641 payload_buf[0..avail_len].copy_from_slice(__input);
20642 Bytes::new(&payload_buf)
20643 } else {
20644 Bytes::new(__input)
20645 };
20646 let mut __struct = Self::default();
20647 __struct.target_system = buf.get_u8()?;
20648 __struct.target_component = buf.get_u8()?;
20649 Ok(__struct)
20650 }
20651 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20652 let mut __tmp = BytesMut::new(bytes);
20653 #[allow(clippy::absurd_extreme_comparisons)]
20654 #[allow(unused_comparisons)]
20655 if __tmp.remaining() < Self::ENCODED_LEN {
20656 panic!(
20657 "buffer is too small (need {} bytes, but got {})",
20658 Self::ENCODED_LEN,
20659 __tmp.remaining(),
20660 )
20661 }
20662 __tmp.put_u8(self.target_system);
20663 __tmp.put_u8(self.target_component);
20664 if matches!(version, MavlinkVersion::V2) {
20665 let len = __tmp.len();
20666 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20667 } else {
20668 __tmp.len()
20669 }
20670 }
20671}
20672#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
20673#[doc = ""]
20674#[doc = "ID: 117"]
20675#[derive(Debug, Clone, PartialEq)]
20676#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20678#[cfg_attr(feature = "ts", derive(TS))]
20679#[cfg_attr(feature = "ts", ts(export))]
20680pub struct LOG_REQUEST_LIST_DATA {
20681 #[doc = "First log id (0 for first available)"]
20682 pub start: u16,
20683 #[doc = "Last log id (0xffff for last available)"]
20684 pub end: u16,
20685 #[doc = "System ID"]
20686 pub target_system: u8,
20687 #[doc = "Component ID"]
20688 pub target_component: u8,
20689}
20690impl LOG_REQUEST_LIST_DATA {
20691 pub const ENCODED_LEN: usize = 6usize;
20692 pub const DEFAULT: Self = Self {
20693 start: 0_u16,
20694 end: 0_u16,
20695 target_system: 0_u8,
20696 target_component: 0_u8,
20697 };
20698 #[cfg(feature = "arbitrary")]
20699 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20700 use arbitrary::{Arbitrary, Unstructured};
20701 let mut buf = [0u8; 1024];
20702 rng.fill_bytes(&mut buf);
20703 let mut unstructured = Unstructured::new(&buf);
20704 Self::arbitrary(&mut unstructured).unwrap_or_default()
20705 }
20706}
20707impl Default for LOG_REQUEST_LIST_DATA {
20708 fn default() -> Self {
20709 Self::DEFAULT.clone()
20710 }
20711}
20712impl MessageData for LOG_REQUEST_LIST_DATA {
20713 type Message = MavMessage;
20714 const ID: u32 = 117u32;
20715 const NAME: &'static str = "LOG_REQUEST_LIST";
20716 const EXTRA_CRC: u8 = 128u8;
20717 const ENCODED_LEN: usize = 6usize;
20718 fn deser(
20719 _version: MavlinkVersion,
20720 __input: &[u8],
20721 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20722 let avail_len = __input.len();
20723 let mut payload_buf = [0; Self::ENCODED_LEN];
20724 let mut buf = if avail_len < Self::ENCODED_LEN {
20725 payload_buf[0..avail_len].copy_from_slice(__input);
20726 Bytes::new(&payload_buf)
20727 } else {
20728 Bytes::new(__input)
20729 };
20730 let mut __struct = Self::default();
20731 __struct.start = buf.get_u16_le()?;
20732 __struct.end = buf.get_u16_le()?;
20733 __struct.target_system = buf.get_u8()?;
20734 __struct.target_component = buf.get_u8()?;
20735 Ok(__struct)
20736 }
20737 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20738 let mut __tmp = BytesMut::new(bytes);
20739 #[allow(clippy::absurd_extreme_comparisons)]
20740 #[allow(unused_comparisons)]
20741 if __tmp.remaining() < Self::ENCODED_LEN {
20742 panic!(
20743 "buffer is too small (need {} bytes, but got {})",
20744 Self::ENCODED_LEN,
20745 __tmp.remaining(),
20746 )
20747 }
20748 __tmp.put_u16_le(self.start);
20749 __tmp.put_u16_le(self.end);
20750 __tmp.put_u8(self.target_system);
20751 __tmp.put_u8(self.target_component);
20752 if matches!(version, MavlinkVersion::V2) {
20753 let len = __tmp.len();
20754 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20755 } else {
20756 __tmp.len()
20757 }
20758 }
20759}
20760#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
20761#[doc = ""]
20762#[doc = "ID: 192"]
20763#[derive(Debug, Clone, PartialEq)]
20764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20766#[cfg_attr(feature = "ts", derive(TS))]
20767#[cfg_attr(feature = "ts", ts(export))]
20768pub struct MAG_CAL_REPORT_DATA {
20769 #[doc = "RMS milligauss residuals."]
20770 pub fitness: f32,
20771 #[doc = "X offset."]
20772 pub ofs_x: f32,
20773 #[doc = "Y offset."]
20774 pub ofs_y: f32,
20775 #[doc = "Z offset."]
20776 pub ofs_z: f32,
20777 #[doc = "X diagonal (matrix 11)."]
20778 pub diag_x: f32,
20779 #[doc = "Y diagonal (matrix 22)."]
20780 pub diag_y: f32,
20781 #[doc = "Z diagonal (matrix 33)."]
20782 pub diag_z: f32,
20783 #[doc = "X off-diagonal (matrix 12 and 21)."]
20784 pub offdiag_x: f32,
20785 #[doc = "Y off-diagonal (matrix 13 and 31)."]
20786 pub offdiag_y: f32,
20787 #[doc = "Z off-diagonal (matrix 32 and 23)."]
20788 pub offdiag_z: f32,
20789 #[doc = "Compass being calibrated."]
20790 pub compass_id: u8,
20791 #[doc = "Bitmask of compasses being calibrated."]
20792 pub cal_mask: u8,
20793 #[doc = "Calibration Status."]
20794 pub cal_status: MagCalStatus,
20795 #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
20796 pub autosaved: u8,
20797 #[doc = "Confidence in orientation (higher is better)."]
20798 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20799 pub orientation_confidence: f32,
20800 #[doc = "orientation before calibration."]
20801 #[cfg_attr(feature = "serde", serde(default))]
20802 pub old_orientation: MavSensorOrientation,
20803 #[doc = "orientation after calibration."]
20804 #[cfg_attr(feature = "serde", serde(default))]
20805 pub new_orientation: MavSensorOrientation,
20806 #[doc = "field radius correction factor"]
20807 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20808 pub scale_factor: f32,
20809}
20810impl MAG_CAL_REPORT_DATA {
20811 pub const ENCODED_LEN: usize = 54usize;
20812 pub const DEFAULT: Self = Self {
20813 fitness: 0.0_f32,
20814 ofs_x: 0.0_f32,
20815 ofs_y: 0.0_f32,
20816 ofs_z: 0.0_f32,
20817 diag_x: 0.0_f32,
20818 diag_y: 0.0_f32,
20819 diag_z: 0.0_f32,
20820 offdiag_x: 0.0_f32,
20821 offdiag_y: 0.0_f32,
20822 offdiag_z: 0.0_f32,
20823 compass_id: 0_u8,
20824 cal_mask: 0_u8,
20825 cal_status: MagCalStatus::DEFAULT,
20826 autosaved: 0_u8,
20827 orientation_confidence: 0.0_f32,
20828 old_orientation: MavSensorOrientation::DEFAULT,
20829 new_orientation: MavSensorOrientation::DEFAULT,
20830 scale_factor: 0.0_f32,
20831 };
20832 #[cfg(feature = "arbitrary")]
20833 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20834 use arbitrary::{Arbitrary, Unstructured};
20835 let mut buf = [0u8; 1024];
20836 rng.fill_bytes(&mut buf);
20837 let mut unstructured = Unstructured::new(&buf);
20838 Self::arbitrary(&mut unstructured).unwrap_or_default()
20839 }
20840}
20841impl Default for MAG_CAL_REPORT_DATA {
20842 fn default() -> Self {
20843 Self::DEFAULT.clone()
20844 }
20845}
20846impl MessageData for MAG_CAL_REPORT_DATA {
20847 type Message = MavMessage;
20848 const ID: u32 = 192u32;
20849 const NAME: &'static str = "MAG_CAL_REPORT";
20850 const EXTRA_CRC: u8 = 36u8;
20851 const ENCODED_LEN: usize = 54usize;
20852 fn deser(
20853 _version: MavlinkVersion,
20854 __input: &[u8],
20855 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20856 let avail_len = __input.len();
20857 let mut payload_buf = [0; Self::ENCODED_LEN];
20858 let mut buf = if avail_len < Self::ENCODED_LEN {
20859 payload_buf[0..avail_len].copy_from_slice(__input);
20860 Bytes::new(&payload_buf)
20861 } else {
20862 Bytes::new(__input)
20863 };
20864 let mut __struct = Self::default();
20865 __struct.fitness = buf.get_f32_le()?;
20866 __struct.ofs_x = buf.get_f32_le()?;
20867 __struct.ofs_y = buf.get_f32_le()?;
20868 __struct.ofs_z = buf.get_f32_le()?;
20869 __struct.diag_x = buf.get_f32_le()?;
20870 __struct.diag_y = buf.get_f32_le()?;
20871 __struct.diag_z = buf.get_f32_le()?;
20872 __struct.offdiag_x = buf.get_f32_le()?;
20873 __struct.offdiag_y = buf.get_f32_le()?;
20874 __struct.offdiag_z = buf.get_f32_le()?;
20875 __struct.compass_id = buf.get_u8()?;
20876 __struct.cal_mask = buf.get_u8()?;
20877 let tmp = buf.get_u8()?;
20878 __struct.cal_status =
20879 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20880 enum_type: "MagCalStatus",
20881 value: tmp as u64,
20882 })?;
20883 __struct.autosaved = buf.get_u8()?;
20884 __struct.orientation_confidence = buf.get_f32_le()?;
20885 let tmp = buf.get_u8()?;
20886 __struct.old_orientation =
20887 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20888 enum_type: "MavSensorOrientation",
20889 value: tmp as u64,
20890 })?;
20891 let tmp = buf.get_u8()?;
20892 __struct.new_orientation =
20893 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20894 enum_type: "MavSensorOrientation",
20895 value: tmp as u64,
20896 })?;
20897 __struct.scale_factor = buf.get_f32_le()?;
20898 Ok(__struct)
20899 }
20900 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20901 let mut __tmp = BytesMut::new(bytes);
20902 #[allow(clippy::absurd_extreme_comparisons)]
20903 #[allow(unused_comparisons)]
20904 if __tmp.remaining() < Self::ENCODED_LEN {
20905 panic!(
20906 "buffer is too small (need {} bytes, but got {})",
20907 Self::ENCODED_LEN,
20908 __tmp.remaining(),
20909 )
20910 }
20911 __tmp.put_f32_le(self.fitness);
20912 __tmp.put_f32_le(self.ofs_x);
20913 __tmp.put_f32_le(self.ofs_y);
20914 __tmp.put_f32_le(self.ofs_z);
20915 __tmp.put_f32_le(self.diag_x);
20916 __tmp.put_f32_le(self.diag_y);
20917 __tmp.put_f32_le(self.diag_z);
20918 __tmp.put_f32_le(self.offdiag_x);
20919 __tmp.put_f32_le(self.offdiag_y);
20920 __tmp.put_f32_le(self.offdiag_z);
20921 __tmp.put_u8(self.compass_id);
20922 __tmp.put_u8(self.cal_mask);
20923 __tmp.put_u8(self.cal_status as u8);
20924 __tmp.put_u8(self.autosaved);
20925 if matches!(version, MavlinkVersion::V2) {
20926 __tmp.put_f32_le(self.orientation_confidence);
20927 __tmp.put_u8(self.old_orientation as u8);
20928 __tmp.put_u8(self.new_orientation as u8);
20929 __tmp.put_f32_le(self.scale_factor);
20930 let len = __tmp.len();
20931 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20932 } else {
20933 __tmp.len()
20934 }
20935 }
20936}
20937#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
20938#[doc = ""]
20939#[doc = "ID: 69"]
20940#[derive(Debug, Clone, PartialEq)]
20941#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20943#[cfg_attr(feature = "ts", derive(TS))]
20944#[cfg_attr(feature = "ts", ts(export))]
20945pub struct MANUAL_CONTROL_DATA {
20946 #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
20947 pub x: i16,
20948 #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
20949 pub y: i16,
20950 #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
20951 pub z: i16,
20952 #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
20953 pub r: i16,
20954 #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
20955 pub buttons: u16,
20956 #[doc = "The system to be controlled."]
20957 pub target: u8,
20958 #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
20959 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20960 pub buttons2: u16,
20961 #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
20962 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20963 pub enabled_extensions: u8,
20964 #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
20965 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20966 pub s: i16,
20967 #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
20968 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20969 pub t: i16,
20970 #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
20971 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20972 pub aux1: i16,
20973 #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
20974 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20975 pub aux2: i16,
20976 #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
20977 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20978 pub aux3: i16,
20979 #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
20980 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20981 pub aux4: i16,
20982 #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
20983 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20984 pub aux5: i16,
20985 #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
20986 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20987 pub aux6: i16,
20988}
20989impl MANUAL_CONTROL_DATA {
20990 pub const ENCODED_LEN: usize = 30usize;
20991 pub const DEFAULT: Self = Self {
20992 x: 0_i16,
20993 y: 0_i16,
20994 z: 0_i16,
20995 r: 0_i16,
20996 buttons: 0_u16,
20997 target: 0_u8,
20998 buttons2: 0_u16,
20999 enabled_extensions: 0_u8,
21000 s: 0_i16,
21001 t: 0_i16,
21002 aux1: 0_i16,
21003 aux2: 0_i16,
21004 aux3: 0_i16,
21005 aux4: 0_i16,
21006 aux5: 0_i16,
21007 aux6: 0_i16,
21008 };
21009 #[cfg(feature = "arbitrary")]
21010 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21011 use arbitrary::{Arbitrary, Unstructured};
21012 let mut buf = [0u8; 1024];
21013 rng.fill_bytes(&mut buf);
21014 let mut unstructured = Unstructured::new(&buf);
21015 Self::arbitrary(&mut unstructured).unwrap_or_default()
21016 }
21017}
21018impl Default for MANUAL_CONTROL_DATA {
21019 fn default() -> Self {
21020 Self::DEFAULT.clone()
21021 }
21022}
21023impl MessageData for MANUAL_CONTROL_DATA {
21024 type Message = MavMessage;
21025 const ID: u32 = 69u32;
21026 const NAME: &'static str = "MANUAL_CONTROL";
21027 const EXTRA_CRC: u8 = 243u8;
21028 const ENCODED_LEN: usize = 30usize;
21029 fn deser(
21030 _version: MavlinkVersion,
21031 __input: &[u8],
21032 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21033 let avail_len = __input.len();
21034 let mut payload_buf = [0; Self::ENCODED_LEN];
21035 let mut buf = if avail_len < Self::ENCODED_LEN {
21036 payload_buf[0..avail_len].copy_from_slice(__input);
21037 Bytes::new(&payload_buf)
21038 } else {
21039 Bytes::new(__input)
21040 };
21041 let mut __struct = Self::default();
21042 __struct.x = buf.get_i16_le()?;
21043 __struct.y = buf.get_i16_le()?;
21044 __struct.z = buf.get_i16_le()?;
21045 __struct.r = buf.get_i16_le()?;
21046 __struct.buttons = buf.get_u16_le()?;
21047 __struct.target = buf.get_u8()?;
21048 __struct.buttons2 = buf.get_u16_le()?;
21049 __struct.enabled_extensions = buf.get_u8()?;
21050 __struct.s = buf.get_i16_le()?;
21051 __struct.t = buf.get_i16_le()?;
21052 __struct.aux1 = buf.get_i16_le()?;
21053 __struct.aux2 = buf.get_i16_le()?;
21054 __struct.aux3 = buf.get_i16_le()?;
21055 __struct.aux4 = buf.get_i16_le()?;
21056 __struct.aux5 = buf.get_i16_le()?;
21057 __struct.aux6 = buf.get_i16_le()?;
21058 Ok(__struct)
21059 }
21060 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21061 let mut __tmp = BytesMut::new(bytes);
21062 #[allow(clippy::absurd_extreme_comparisons)]
21063 #[allow(unused_comparisons)]
21064 if __tmp.remaining() < Self::ENCODED_LEN {
21065 panic!(
21066 "buffer is too small (need {} bytes, but got {})",
21067 Self::ENCODED_LEN,
21068 __tmp.remaining(),
21069 )
21070 }
21071 __tmp.put_i16_le(self.x);
21072 __tmp.put_i16_le(self.y);
21073 __tmp.put_i16_le(self.z);
21074 __tmp.put_i16_le(self.r);
21075 __tmp.put_u16_le(self.buttons);
21076 __tmp.put_u8(self.target);
21077 if matches!(version, MavlinkVersion::V2) {
21078 __tmp.put_u16_le(self.buttons2);
21079 __tmp.put_u8(self.enabled_extensions);
21080 __tmp.put_i16_le(self.s);
21081 __tmp.put_i16_le(self.t);
21082 __tmp.put_i16_le(self.aux1);
21083 __tmp.put_i16_le(self.aux2);
21084 __tmp.put_i16_le(self.aux3);
21085 __tmp.put_i16_le(self.aux4);
21086 __tmp.put_i16_le(self.aux5);
21087 __tmp.put_i16_le(self.aux6);
21088 let len = __tmp.len();
21089 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21090 } else {
21091 __tmp.len()
21092 }
21093 }
21094}
21095#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
21096#[doc = ""]
21097#[doc = "ID: 81"]
21098#[derive(Debug, Clone, PartialEq)]
21099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21101#[cfg_attr(feature = "ts", derive(TS))]
21102#[cfg_attr(feature = "ts", ts(export))]
21103pub struct MANUAL_SETPOINT_DATA {
21104 #[doc = "Timestamp (time since system boot)."]
21105 pub time_boot_ms: u32,
21106 #[doc = "Desired roll rate"]
21107 pub roll: f32,
21108 #[doc = "Desired pitch rate"]
21109 pub pitch: f32,
21110 #[doc = "Desired yaw rate"]
21111 pub yaw: f32,
21112 #[doc = "Collective thrust, normalized to 0 .. 1"]
21113 pub thrust: f32,
21114 #[doc = "Flight mode switch position, 0.. 255"]
21115 pub mode_switch: u8,
21116 #[doc = "Override mode switch position, 0.. 255"]
21117 pub manual_override_switch: u8,
21118}
21119impl MANUAL_SETPOINT_DATA {
21120 pub const ENCODED_LEN: usize = 22usize;
21121 pub const DEFAULT: Self = Self {
21122 time_boot_ms: 0_u32,
21123 roll: 0.0_f32,
21124 pitch: 0.0_f32,
21125 yaw: 0.0_f32,
21126 thrust: 0.0_f32,
21127 mode_switch: 0_u8,
21128 manual_override_switch: 0_u8,
21129 };
21130 #[cfg(feature = "arbitrary")]
21131 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21132 use arbitrary::{Arbitrary, Unstructured};
21133 let mut buf = [0u8; 1024];
21134 rng.fill_bytes(&mut buf);
21135 let mut unstructured = Unstructured::new(&buf);
21136 Self::arbitrary(&mut unstructured).unwrap_or_default()
21137 }
21138}
21139impl Default for MANUAL_SETPOINT_DATA {
21140 fn default() -> Self {
21141 Self::DEFAULT.clone()
21142 }
21143}
21144impl MessageData for MANUAL_SETPOINT_DATA {
21145 type Message = MavMessage;
21146 const ID: u32 = 81u32;
21147 const NAME: &'static str = "MANUAL_SETPOINT";
21148 const EXTRA_CRC: u8 = 106u8;
21149 const ENCODED_LEN: usize = 22usize;
21150 fn deser(
21151 _version: MavlinkVersion,
21152 __input: &[u8],
21153 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21154 let avail_len = __input.len();
21155 let mut payload_buf = [0; Self::ENCODED_LEN];
21156 let mut buf = if avail_len < Self::ENCODED_LEN {
21157 payload_buf[0..avail_len].copy_from_slice(__input);
21158 Bytes::new(&payload_buf)
21159 } else {
21160 Bytes::new(__input)
21161 };
21162 let mut __struct = Self::default();
21163 __struct.time_boot_ms = buf.get_u32_le()?;
21164 __struct.roll = buf.get_f32_le()?;
21165 __struct.pitch = buf.get_f32_le()?;
21166 __struct.yaw = buf.get_f32_le()?;
21167 __struct.thrust = buf.get_f32_le()?;
21168 __struct.mode_switch = buf.get_u8()?;
21169 __struct.manual_override_switch = buf.get_u8()?;
21170 Ok(__struct)
21171 }
21172 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21173 let mut __tmp = BytesMut::new(bytes);
21174 #[allow(clippy::absurd_extreme_comparisons)]
21175 #[allow(unused_comparisons)]
21176 if __tmp.remaining() < Self::ENCODED_LEN {
21177 panic!(
21178 "buffer is too small (need {} bytes, but got {})",
21179 Self::ENCODED_LEN,
21180 __tmp.remaining(),
21181 )
21182 }
21183 __tmp.put_u32_le(self.time_boot_ms);
21184 __tmp.put_f32_le(self.roll);
21185 __tmp.put_f32_le(self.pitch);
21186 __tmp.put_f32_le(self.yaw);
21187 __tmp.put_f32_le(self.thrust);
21188 __tmp.put_u8(self.mode_switch);
21189 __tmp.put_u8(self.manual_override_switch);
21190 if matches!(version, MavlinkVersion::V2) {
21191 let len = __tmp.len();
21192 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21193 } else {
21194 __tmp.len()
21195 }
21196 }
21197}
21198#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21199#[doc = ""]
21200#[doc = "ID: 249"]
21201#[derive(Debug, Clone, PartialEq)]
21202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21204#[cfg_attr(feature = "ts", derive(TS))]
21205#[cfg_attr(feature = "ts", ts(export))]
21206pub struct MEMORY_VECT_DATA {
21207 #[doc = "Starting address of the debug variables"]
21208 pub address: u16,
21209 #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
21210 pub ver: u8,
21211 #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
21212 pub mavtype: u8,
21213 #[doc = "Memory contents at specified address"]
21214 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21215 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21216 pub value: [i8; 32],
21217}
21218impl MEMORY_VECT_DATA {
21219 pub const ENCODED_LEN: usize = 36usize;
21220 pub const DEFAULT: Self = Self {
21221 address: 0_u16,
21222 ver: 0_u8,
21223 mavtype: 0_u8,
21224 value: [0_i8; 32usize],
21225 };
21226 #[cfg(feature = "arbitrary")]
21227 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21228 use arbitrary::{Arbitrary, Unstructured};
21229 let mut buf = [0u8; 1024];
21230 rng.fill_bytes(&mut buf);
21231 let mut unstructured = Unstructured::new(&buf);
21232 Self::arbitrary(&mut unstructured).unwrap_or_default()
21233 }
21234}
21235impl Default for MEMORY_VECT_DATA {
21236 fn default() -> Self {
21237 Self::DEFAULT.clone()
21238 }
21239}
21240impl MessageData for MEMORY_VECT_DATA {
21241 type Message = MavMessage;
21242 const ID: u32 = 249u32;
21243 const NAME: &'static str = "MEMORY_VECT";
21244 const EXTRA_CRC: u8 = 204u8;
21245 const ENCODED_LEN: usize = 36usize;
21246 fn deser(
21247 _version: MavlinkVersion,
21248 __input: &[u8],
21249 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21250 let avail_len = __input.len();
21251 let mut payload_buf = [0; Self::ENCODED_LEN];
21252 let mut buf = if avail_len < Self::ENCODED_LEN {
21253 payload_buf[0..avail_len].copy_from_slice(__input);
21254 Bytes::new(&payload_buf)
21255 } else {
21256 Bytes::new(__input)
21257 };
21258 let mut __struct = Self::default();
21259 __struct.address = buf.get_u16_le()?;
21260 __struct.ver = buf.get_u8()?;
21261 __struct.mavtype = buf.get_u8()?;
21262 for v in &mut __struct.value {
21263 let val = buf.get_i8()?;
21264 *v = val;
21265 }
21266 Ok(__struct)
21267 }
21268 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21269 let mut __tmp = BytesMut::new(bytes);
21270 #[allow(clippy::absurd_extreme_comparisons)]
21271 #[allow(unused_comparisons)]
21272 if __tmp.remaining() < Self::ENCODED_LEN {
21273 panic!(
21274 "buffer is too small (need {} bytes, but got {})",
21275 Self::ENCODED_LEN,
21276 __tmp.remaining(),
21277 )
21278 }
21279 __tmp.put_u16_le(self.address);
21280 __tmp.put_u8(self.ver);
21281 __tmp.put_u8(self.mavtype);
21282 for val in &self.value {
21283 __tmp.put_i8(*val);
21284 }
21285 if matches!(version, MavlinkVersion::V2) {
21286 let len = __tmp.len();
21287 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21288 } else {
21289 __tmp.len()
21290 }
21291 }
21292}
21293#[doc = "The interval between messages for a particular MAVLink message ID. This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
21294#[doc = ""]
21295#[doc = "ID: 244"]
21296#[derive(Debug, Clone, PartialEq)]
21297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21299#[cfg_attr(feature = "ts", derive(TS))]
21300#[cfg_attr(feature = "ts", ts(export))]
21301pub struct MESSAGE_INTERVAL_DATA {
21302 #[doc = "The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available,>0 indicates the interval at which it is sent."]
21303 pub interval_us: i32,
21304 #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
21305 pub message_id: u16,
21306}
21307impl MESSAGE_INTERVAL_DATA {
21308 pub const ENCODED_LEN: usize = 6usize;
21309 pub const DEFAULT: Self = Self {
21310 interval_us: 0_i32,
21311 message_id: 0_u16,
21312 };
21313 #[cfg(feature = "arbitrary")]
21314 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21315 use arbitrary::{Arbitrary, Unstructured};
21316 let mut buf = [0u8; 1024];
21317 rng.fill_bytes(&mut buf);
21318 let mut unstructured = Unstructured::new(&buf);
21319 Self::arbitrary(&mut unstructured).unwrap_or_default()
21320 }
21321}
21322impl Default for MESSAGE_INTERVAL_DATA {
21323 fn default() -> Self {
21324 Self::DEFAULT.clone()
21325 }
21326}
21327impl MessageData for MESSAGE_INTERVAL_DATA {
21328 type Message = MavMessage;
21329 const ID: u32 = 244u32;
21330 const NAME: &'static str = "MESSAGE_INTERVAL";
21331 const EXTRA_CRC: u8 = 95u8;
21332 const ENCODED_LEN: usize = 6usize;
21333 fn deser(
21334 _version: MavlinkVersion,
21335 __input: &[u8],
21336 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21337 let avail_len = __input.len();
21338 let mut payload_buf = [0; Self::ENCODED_LEN];
21339 let mut buf = if avail_len < Self::ENCODED_LEN {
21340 payload_buf[0..avail_len].copy_from_slice(__input);
21341 Bytes::new(&payload_buf)
21342 } else {
21343 Bytes::new(__input)
21344 };
21345 let mut __struct = Self::default();
21346 __struct.interval_us = buf.get_i32_le()?;
21347 __struct.message_id = buf.get_u16_le()?;
21348 Ok(__struct)
21349 }
21350 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21351 let mut __tmp = BytesMut::new(bytes);
21352 #[allow(clippy::absurd_extreme_comparisons)]
21353 #[allow(unused_comparisons)]
21354 if __tmp.remaining() < Self::ENCODED_LEN {
21355 panic!(
21356 "buffer is too small (need {} bytes, but got {})",
21357 Self::ENCODED_LEN,
21358 __tmp.remaining(),
21359 )
21360 }
21361 __tmp.put_i32_le(self.interval_us);
21362 __tmp.put_u16_le(self.message_id);
21363 if matches!(version, MavlinkVersion::V2) {
21364 let len = __tmp.len();
21365 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21366 } else {
21367 __tmp.len()
21368 }
21369 }
21370}
21371#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
21372#[doc = ""]
21373#[doc = "ID: 47"]
21374#[derive(Debug, Clone, PartialEq)]
21375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21377#[cfg_attr(feature = "ts", derive(TS))]
21378#[cfg_attr(feature = "ts", ts(export))]
21379pub struct MISSION_ACK_DATA {
21380 #[doc = "System ID"]
21381 pub target_system: u8,
21382 #[doc = "Component ID"]
21383 pub target_component: u8,
21384 #[doc = "Mission result."]
21385 pub mavtype: MavMissionResult,
21386 #[doc = "Mission type."]
21387 #[cfg_attr(feature = "serde", serde(default))]
21388 pub mission_type: MavMissionType,
21389 #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). 0 if plan ids are not supported. The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
21390 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21391 pub opaque_id: u32,
21392}
21393impl MISSION_ACK_DATA {
21394 pub const ENCODED_LEN: usize = 8usize;
21395 pub const DEFAULT: Self = Self {
21396 target_system: 0_u8,
21397 target_component: 0_u8,
21398 mavtype: MavMissionResult::DEFAULT,
21399 mission_type: MavMissionType::DEFAULT,
21400 opaque_id: 0_u32,
21401 };
21402 #[cfg(feature = "arbitrary")]
21403 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21404 use arbitrary::{Arbitrary, Unstructured};
21405 let mut buf = [0u8; 1024];
21406 rng.fill_bytes(&mut buf);
21407 let mut unstructured = Unstructured::new(&buf);
21408 Self::arbitrary(&mut unstructured).unwrap_or_default()
21409 }
21410}
21411impl Default for MISSION_ACK_DATA {
21412 fn default() -> Self {
21413 Self::DEFAULT.clone()
21414 }
21415}
21416impl MessageData for MISSION_ACK_DATA {
21417 type Message = MavMessage;
21418 const ID: u32 = 47u32;
21419 const NAME: &'static str = "MISSION_ACK";
21420 const EXTRA_CRC: u8 = 153u8;
21421 const ENCODED_LEN: usize = 8usize;
21422 fn deser(
21423 _version: MavlinkVersion,
21424 __input: &[u8],
21425 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21426 let avail_len = __input.len();
21427 let mut payload_buf = [0; Self::ENCODED_LEN];
21428 let mut buf = if avail_len < Self::ENCODED_LEN {
21429 payload_buf[0..avail_len].copy_from_slice(__input);
21430 Bytes::new(&payload_buf)
21431 } else {
21432 Bytes::new(__input)
21433 };
21434 let mut __struct = Self::default();
21435 __struct.target_system = buf.get_u8()?;
21436 __struct.target_component = buf.get_u8()?;
21437 let tmp = buf.get_u8()?;
21438 __struct.mavtype =
21439 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21440 enum_type: "MavMissionResult",
21441 value: tmp as u64,
21442 })?;
21443 let tmp = buf.get_u8()?;
21444 __struct.mission_type =
21445 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21446 enum_type: "MavMissionType",
21447 value: tmp as u64,
21448 })?;
21449 __struct.opaque_id = buf.get_u32_le()?;
21450 Ok(__struct)
21451 }
21452 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21453 let mut __tmp = BytesMut::new(bytes);
21454 #[allow(clippy::absurd_extreme_comparisons)]
21455 #[allow(unused_comparisons)]
21456 if __tmp.remaining() < Self::ENCODED_LEN {
21457 panic!(
21458 "buffer is too small (need {} bytes, but got {})",
21459 Self::ENCODED_LEN,
21460 __tmp.remaining(),
21461 )
21462 }
21463 __tmp.put_u8(self.target_system);
21464 __tmp.put_u8(self.target_component);
21465 __tmp.put_u8(self.mavtype as u8);
21466 if matches!(version, MavlinkVersion::V2) {
21467 __tmp.put_u8(self.mission_type as u8);
21468 __tmp.put_u32_le(self.opaque_id);
21469 let len = __tmp.len();
21470 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21471 } else {
21472 __tmp.len()
21473 }
21474 }
21475}
21476#[doc = "Delete all mission items at once."]
21477#[doc = ""]
21478#[doc = "ID: 45"]
21479#[derive(Debug, Clone, PartialEq)]
21480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21482#[cfg_attr(feature = "ts", derive(TS))]
21483#[cfg_attr(feature = "ts", ts(export))]
21484pub struct MISSION_CLEAR_ALL_DATA {
21485 #[doc = "System ID"]
21486 pub target_system: u8,
21487 #[doc = "Component ID"]
21488 pub target_component: u8,
21489 #[doc = "Mission type."]
21490 #[cfg_attr(feature = "serde", serde(default))]
21491 pub mission_type: MavMissionType,
21492}
21493impl MISSION_CLEAR_ALL_DATA {
21494 pub const ENCODED_LEN: usize = 3usize;
21495 pub const DEFAULT: Self = Self {
21496 target_system: 0_u8,
21497 target_component: 0_u8,
21498 mission_type: MavMissionType::DEFAULT,
21499 };
21500 #[cfg(feature = "arbitrary")]
21501 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21502 use arbitrary::{Arbitrary, Unstructured};
21503 let mut buf = [0u8; 1024];
21504 rng.fill_bytes(&mut buf);
21505 let mut unstructured = Unstructured::new(&buf);
21506 Self::arbitrary(&mut unstructured).unwrap_or_default()
21507 }
21508}
21509impl Default for MISSION_CLEAR_ALL_DATA {
21510 fn default() -> Self {
21511 Self::DEFAULT.clone()
21512 }
21513}
21514impl MessageData for MISSION_CLEAR_ALL_DATA {
21515 type Message = MavMessage;
21516 const ID: u32 = 45u32;
21517 const NAME: &'static str = "MISSION_CLEAR_ALL";
21518 const EXTRA_CRC: u8 = 232u8;
21519 const ENCODED_LEN: usize = 3usize;
21520 fn deser(
21521 _version: MavlinkVersion,
21522 __input: &[u8],
21523 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21524 let avail_len = __input.len();
21525 let mut payload_buf = [0; Self::ENCODED_LEN];
21526 let mut buf = if avail_len < Self::ENCODED_LEN {
21527 payload_buf[0..avail_len].copy_from_slice(__input);
21528 Bytes::new(&payload_buf)
21529 } else {
21530 Bytes::new(__input)
21531 };
21532 let mut __struct = Self::default();
21533 __struct.target_system = buf.get_u8()?;
21534 __struct.target_component = buf.get_u8()?;
21535 let tmp = buf.get_u8()?;
21536 __struct.mission_type =
21537 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21538 enum_type: "MavMissionType",
21539 value: tmp as u64,
21540 })?;
21541 Ok(__struct)
21542 }
21543 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21544 let mut __tmp = BytesMut::new(bytes);
21545 #[allow(clippy::absurd_extreme_comparisons)]
21546 #[allow(unused_comparisons)]
21547 if __tmp.remaining() < Self::ENCODED_LEN {
21548 panic!(
21549 "buffer is too small (need {} bytes, but got {})",
21550 Self::ENCODED_LEN,
21551 __tmp.remaining(),
21552 )
21553 }
21554 __tmp.put_u8(self.target_system);
21555 __tmp.put_u8(self.target_component);
21556 if matches!(version, MavlinkVersion::V2) {
21557 __tmp.put_u8(self.mission_type as u8);
21558 let len = __tmp.len();
21559 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21560 } else {
21561 __tmp.len()
21562 }
21563 }
21564}
21565#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
21566#[doc = ""]
21567#[doc = "ID: 44"]
21568#[derive(Debug, Clone, PartialEq)]
21569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21571#[cfg_attr(feature = "ts", derive(TS))]
21572#[cfg_attr(feature = "ts", ts(export))]
21573pub struct MISSION_COUNT_DATA {
21574 #[doc = "Number of mission items in the sequence"]
21575 pub count: u16,
21576 #[doc = "System ID"]
21577 pub target_system: u8,
21578 #[doc = "Component ID"]
21579 pub target_component: u8,
21580 #[doc = "Mission type."]
21581 #[cfg_attr(feature = "serde", serde(default))]
21582 pub mission_type: MavMissionType,
21583 #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). This field is used when downloading a plan from a vehicle to a GCS. 0 on upload to the vehicle from GCS. 0 if plan ids are not supported. The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
21584 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21585 pub opaque_id: u32,
21586}
21587impl MISSION_COUNT_DATA {
21588 pub const ENCODED_LEN: usize = 9usize;
21589 pub const DEFAULT: Self = Self {
21590 count: 0_u16,
21591 target_system: 0_u8,
21592 target_component: 0_u8,
21593 mission_type: MavMissionType::DEFAULT,
21594 opaque_id: 0_u32,
21595 };
21596 #[cfg(feature = "arbitrary")]
21597 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21598 use arbitrary::{Arbitrary, Unstructured};
21599 let mut buf = [0u8; 1024];
21600 rng.fill_bytes(&mut buf);
21601 let mut unstructured = Unstructured::new(&buf);
21602 Self::arbitrary(&mut unstructured).unwrap_or_default()
21603 }
21604}
21605impl Default for MISSION_COUNT_DATA {
21606 fn default() -> Self {
21607 Self::DEFAULT.clone()
21608 }
21609}
21610impl MessageData for MISSION_COUNT_DATA {
21611 type Message = MavMessage;
21612 const ID: u32 = 44u32;
21613 const NAME: &'static str = "MISSION_COUNT";
21614 const EXTRA_CRC: u8 = 221u8;
21615 const ENCODED_LEN: usize = 9usize;
21616 fn deser(
21617 _version: MavlinkVersion,
21618 __input: &[u8],
21619 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21620 let avail_len = __input.len();
21621 let mut payload_buf = [0; Self::ENCODED_LEN];
21622 let mut buf = if avail_len < Self::ENCODED_LEN {
21623 payload_buf[0..avail_len].copy_from_slice(__input);
21624 Bytes::new(&payload_buf)
21625 } else {
21626 Bytes::new(__input)
21627 };
21628 let mut __struct = Self::default();
21629 __struct.count = buf.get_u16_le()?;
21630 __struct.target_system = buf.get_u8()?;
21631 __struct.target_component = buf.get_u8()?;
21632 let tmp = buf.get_u8()?;
21633 __struct.mission_type =
21634 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21635 enum_type: "MavMissionType",
21636 value: tmp as u64,
21637 })?;
21638 __struct.opaque_id = buf.get_u32_le()?;
21639 Ok(__struct)
21640 }
21641 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21642 let mut __tmp = BytesMut::new(bytes);
21643 #[allow(clippy::absurd_extreme_comparisons)]
21644 #[allow(unused_comparisons)]
21645 if __tmp.remaining() < Self::ENCODED_LEN {
21646 panic!(
21647 "buffer is too small (need {} bytes, but got {})",
21648 Self::ENCODED_LEN,
21649 __tmp.remaining(),
21650 )
21651 }
21652 __tmp.put_u16_le(self.count);
21653 __tmp.put_u8(self.target_system);
21654 __tmp.put_u8(self.target_component);
21655 if matches!(version, MavlinkVersion::V2) {
21656 __tmp.put_u8(self.mission_type as u8);
21657 __tmp.put_u32_le(self.opaque_id);
21658 let len = __tmp.len();
21659 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21660 } else {
21661 __tmp.len()
21662 }
21663 }
21664}
21665#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running). This message should be streamed all the time (nominally at 1Hz). This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
21666#[doc = ""]
21667#[doc = "ID: 42"]
21668#[derive(Debug, Clone, PartialEq)]
21669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21671#[cfg_attr(feature = "ts", derive(TS))]
21672#[cfg_attr(feature = "ts", ts(export))]
21673pub struct MISSION_CURRENT_DATA {
21674 #[doc = "Sequence"]
21675 pub seq: u16,
21676 #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
21677 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21678 pub total: u16,
21679 #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
21680 #[cfg_attr(feature = "serde", serde(default))]
21681 pub mission_state: MissionState,
21682 #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
21683 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21684 pub mission_mode: u8,
21685 #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
21686 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21687 pub mission_id: u32,
21688 #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
21689 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21690 pub fence_id: u32,
21691 #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
21692 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21693 pub rally_points_id: u32,
21694}
21695impl MISSION_CURRENT_DATA {
21696 pub const ENCODED_LEN: usize = 18usize;
21697 pub const DEFAULT: Self = Self {
21698 seq: 0_u16,
21699 total: 0_u16,
21700 mission_state: MissionState::DEFAULT,
21701 mission_mode: 0_u8,
21702 mission_id: 0_u32,
21703 fence_id: 0_u32,
21704 rally_points_id: 0_u32,
21705 };
21706 #[cfg(feature = "arbitrary")]
21707 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21708 use arbitrary::{Arbitrary, Unstructured};
21709 let mut buf = [0u8; 1024];
21710 rng.fill_bytes(&mut buf);
21711 let mut unstructured = Unstructured::new(&buf);
21712 Self::arbitrary(&mut unstructured).unwrap_or_default()
21713 }
21714}
21715impl Default for MISSION_CURRENT_DATA {
21716 fn default() -> Self {
21717 Self::DEFAULT.clone()
21718 }
21719}
21720impl MessageData for MISSION_CURRENT_DATA {
21721 type Message = MavMessage;
21722 const ID: u32 = 42u32;
21723 const NAME: &'static str = "MISSION_CURRENT";
21724 const EXTRA_CRC: u8 = 28u8;
21725 const ENCODED_LEN: usize = 18usize;
21726 fn deser(
21727 _version: MavlinkVersion,
21728 __input: &[u8],
21729 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21730 let avail_len = __input.len();
21731 let mut payload_buf = [0; Self::ENCODED_LEN];
21732 let mut buf = if avail_len < Self::ENCODED_LEN {
21733 payload_buf[0..avail_len].copy_from_slice(__input);
21734 Bytes::new(&payload_buf)
21735 } else {
21736 Bytes::new(__input)
21737 };
21738 let mut __struct = Self::default();
21739 __struct.seq = buf.get_u16_le()?;
21740 __struct.total = buf.get_u16_le()?;
21741 let tmp = buf.get_u8()?;
21742 __struct.mission_state =
21743 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21744 enum_type: "MissionState",
21745 value: tmp as u64,
21746 })?;
21747 __struct.mission_mode = buf.get_u8()?;
21748 __struct.mission_id = buf.get_u32_le()?;
21749 __struct.fence_id = buf.get_u32_le()?;
21750 __struct.rally_points_id = buf.get_u32_le()?;
21751 Ok(__struct)
21752 }
21753 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21754 let mut __tmp = BytesMut::new(bytes);
21755 #[allow(clippy::absurd_extreme_comparisons)]
21756 #[allow(unused_comparisons)]
21757 if __tmp.remaining() < Self::ENCODED_LEN {
21758 panic!(
21759 "buffer is too small (need {} bytes, but got {})",
21760 Self::ENCODED_LEN,
21761 __tmp.remaining(),
21762 )
21763 }
21764 __tmp.put_u16_le(self.seq);
21765 if matches!(version, MavlinkVersion::V2) {
21766 __tmp.put_u16_le(self.total);
21767 __tmp.put_u8(self.mission_state as u8);
21768 __tmp.put_u8(self.mission_mode);
21769 __tmp.put_u32_le(self.mission_id);
21770 __tmp.put_u32_le(self.fence_id);
21771 __tmp.put_u32_le(self.rally_points_id);
21772 let len = __tmp.len();
21773 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21774 } else {
21775 __tmp.len()
21776 }
21777 }
21778}
21779#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
21780#[doc = "Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
21781#[doc = ""]
21782#[doc = "ID: 39"]
21783#[derive(Debug, Clone, PartialEq)]
21784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21786#[cfg_attr(feature = "ts", derive(TS))]
21787#[cfg_attr(feature = "ts", ts(export))]
21788pub struct MISSION_ITEM_DATA {
21789 #[doc = "PARAM1, see MAV_CMD enum"]
21790 pub param1: f32,
21791 #[doc = "PARAM2, see MAV_CMD enum"]
21792 pub param2: f32,
21793 #[doc = "PARAM3, see MAV_CMD enum"]
21794 pub param3: f32,
21795 #[doc = "PARAM4, see MAV_CMD enum"]
21796 pub param4: f32,
21797 #[doc = "PARAM5 / local: X coordinate, global: latitude"]
21798 pub x: f32,
21799 #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
21800 pub y: f32,
21801 #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
21802 pub z: f32,
21803 #[doc = "Sequence"]
21804 pub seq: u16,
21805 #[doc = "The scheduled action for the waypoint."]
21806 pub command: MavCmd,
21807 #[doc = "System ID"]
21808 pub target_system: u8,
21809 #[doc = "Component ID"]
21810 pub target_component: u8,
21811 #[doc = "The coordinate system of the waypoint."]
21812 pub frame: MavFrame,
21813 #[doc = "false:0, true:1"]
21814 pub current: u8,
21815 #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
21816 pub autocontinue: u8,
21817 #[doc = "Mission type."]
21818 #[cfg_attr(feature = "serde", serde(default))]
21819 pub mission_type: MavMissionType,
21820}
21821impl MISSION_ITEM_DATA {
21822 pub const ENCODED_LEN: usize = 38usize;
21823 pub const DEFAULT: Self = Self {
21824 param1: 0.0_f32,
21825 param2: 0.0_f32,
21826 param3: 0.0_f32,
21827 param4: 0.0_f32,
21828 x: 0.0_f32,
21829 y: 0.0_f32,
21830 z: 0.0_f32,
21831 seq: 0_u16,
21832 command: MavCmd::DEFAULT,
21833 target_system: 0_u8,
21834 target_component: 0_u8,
21835 frame: MavFrame::DEFAULT,
21836 current: 0_u8,
21837 autocontinue: 0_u8,
21838 mission_type: MavMissionType::DEFAULT,
21839 };
21840 #[cfg(feature = "arbitrary")]
21841 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21842 use arbitrary::{Arbitrary, Unstructured};
21843 let mut buf = [0u8; 1024];
21844 rng.fill_bytes(&mut buf);
21845 let mut unstructured = Unstructured::new(&buf);
21846 Self::arbitrary(&mut unstructured).unwrap_or_default()
21847 }
21848}
21849impl Default for MISSION_ITEM_DATA {
21850 fn default() -> Self {
21851 Self::DEFAULT.clone()
21852 }
21853}
21854impl MessageData for MISSION_ITEM_DATA {
21855 type Message = MavMessage;
21856 const ID: u32 = 39u32;
21857 const NAME: &'static str = "MISSION_ITEM";
21858 const EXTRA_CRC: u8 = 254u8;
21859 const ENCODED_LEN: usize = 38usize;
21860 fn deser(
21861 _version: MavlinkVersion,
21862 __input: &[u8],
21863 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21864 let avail_len = __input.len();
21865 let mut payload_buf = [0; Self::ENCODED_LEN];
21866 let mut buf = if avail_len < Self::ENCODED_LEN {
21867 payload_buf[0..avail_len].copy_from_slice(__input);
21868 Bytes::new(&payload_buf)
21869 } else {
21870 Bytes::new(__input)
21871 };
21872 let mut __struct = Self::default();
21873 __struct.param1 = buf.get_f32_le()?;
21874 __struct.param2 = buf.get_f32_le()?;
21875 __struct.param3 = buf.get_f32_le()?;
21876 __struct.param4 = buf.get_f32_le()?;
21877 __struct.x = buf.get_f32_le()?;
21878 __struct.y = buf.get_f32_le()?;
21879 __struct.z = buf.get_f32_le()?;
21880 __struct.seq = buf.get_u16_le()?;
21881 let tmp = buf.get_u16_le()?;
21882 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
21883 ::mavlink_core::error::ParserError::InvalidEnum {
21884 enum_type: "MavCmd",
21885 value: tmp as u64,
21886 },
21887 )?;
21888 __struct.target_system = buf.get_u8()?;
21889 __struct.target_component = buf.get_u8()?;
21890 let tmp = buf.get_u8()?;
21891 __struct.frame =
21892 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21893 enum_type: "MavFrame",
21894 value: tmp as u64,
21895 })?;
21896 __struct.current = buf.get_u8()?;
21897 __struct.autocontinue = buf.get_u8()?;
21898 let tmp = buf.get_u8()?;
21899 __struct.mission_type =
21900 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21901 enum_type: "MavMissionType",
21902 value: tmp as u64,
21903 })?;
21904 Ok(__struct)
21905 }
21906 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21907 let mut __tmp = BytesMut::new(bytes);
21908 #[allow(clippy::absurd_extreme_comparisons)]
21909 #[allow(unused_comparisons)]
21910 if __tmp.remaining() < Self::ENCODED_LEN {
21911 panic!(
21912 "buffer is too small (need {} bytes, but got {})",
21913 Self::ENCODED_LEN,
21914 __tmp.remaining(),
21915 )
21916 }
21917 __tmp.put_f32_le(self.param1);
21918 __tmp.put_f32_le(self.param2);
21919 __tmp.put_f32_le(self.param3);
21920 __tmp.put_f32_le(self.param4);
21921 __tmp.put_f32_le(self.x);
21922 __tmp.put_f32_le(self.y);
21923 __tmp.put_f32_le(self.z);
21924 __tmp.put_u16_le(self.seq);
21925 __tmp.put_u16_le(self.command as u16);
21926 __tmp.put_u8(self.target_system);
21927 __tmp.put_u8(self.target_component);
21928 __tmp.put_u8(self.frame as u8);
21929 __tmp.put_u8(self.current);
21930 __tmp.put_u8(self.autocontinue);
21931 if matches!(version, MavlinkVersion::V2) {
21932 __tmp.put_u8(self.mission_type as u8);
21933 let len = __tmp.len();
21934 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21935 } else {
21936 __tmp.len()
21937 }
21938 }
21939}
21940#[doc = "Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
21941#[doc = ""]
21942#[doc = "ID: 73"]
21943#[derive(Debug, Clone, PartialEq)]
21944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21946#[cfg_attr(feature = "ts", derive(TS))]
21947#[cfg_attr(feature = "ts", ts(export))]
21948pub struct MISSION_ITEM_INT_DATA {
21949 #[doc = "PARAM1, see MAV_CMD enum"]
21950 pub param1: f32,
21951 #[doc = "PARAM2, see MAV_CMD enum"]
21952 pub param2: f32,
21953 #[doc = "PARAM3, see MAV_CMD enum"]
21954 pub param3: f32,
21955 #[doc = "PARAM4, see MAV_CMD enum"]
21956 pub param4: f32,
21957 #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
21958 pub x: i32,
21959 #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
21960 pub y: i32,
21961 #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
21962 pub z: f32,
21963 #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
21964 pub seq: u16,
21965 #[doc = "The scheduled action for the waypoint."]
21966 pub command: MavCmd,
21967 #[doc = "System ID"]
21968 pub target_system: u8,
21969 #[doc = "Component ID"]
21970 pub target_component: u8,
21971 #[doc = "The coordinate system of the waypoint."]
21972 pub frame: MavFrame,
21973 #[doc = "false:0, true:1"]
21974 pub current: u8,
21975 #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
21976 pub autocontinue: u8,
21977 #[doc = "Mission type."]
21978 #[cfg_attr(feature = "serde", serde(default))]
21979 pub mission_type: MavMissionType,
21980}
21981impl MISSION_ITEM_INT_DATA {
21982 pub const ENCODED_LEN: usize = 38usize;
21983 pub const DEFAULT: Self = Self {
21984 param1: 0.0_f32,
21985 param2: 0.0_f32,
21986 param3: 0.0_f32,
21987 param4: 0.0_f32,
21988 x: 0_i32,
21989 y: 0_i32,
21990 z: 0.0_f32,
21991 seq: 0_u16,
21992 command: MavCmd::DEFAULT,
21993 target_system: 0_u8,
21994 target_component: 0_u8,
21995 frame: MavFrame::DEFAULT,
21996 current: 0_u8,
21997 autocontinue: 0_u8,
21998 mission_type: MavMissionType::DEFAULT,
21999 };
22000 #[cfg(feature = "arbitrary")]
22001 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22002 use arbitrary::{Arbitrary, Unstructured};
22003 let mut buf = [0u8; 1024];
22004 rng.fill_bytes(&mut buf);
22005 let mut unstructured = Unstructured::new(&buf);
22006 Self::arbitrary(&mut unstructured).unwrap_or_default()
22007 }
22008}
22009impl Default for MISSION_ITEM_INT_DATA {
22010 fn default() -> Self {
22011 Self::DEFAULT.clone()
22012 }
22013}
22014impl MessageData for MISSION_ITEM_INT_DATA {
22015 type Message = MavMessage;
22016 const ID: u32 = 73u32;
22017 const NAME: &'static str = "MISSION_ITEM_INT";
22018 const EXTRA_CRC: u8 = 38u8;
22019 const ENCODED_LEN: usize = 38usize;
22020 fn deser(
22021 _version: MavlinkVersion,
22022 __input: &[u8],
22023 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22024 let avail_len = __input.len();
22025 let mut payload_buf = [0; Self::ENCODED_LEN];
22026 let mut buf = if avail_len < Self::ENCODED_LEN {
22027 payload_buf[0..avail_len].copy_from_slice(__input);
22028 Bytes::new(&payload_buf)
22029 } else {
22030 Bytes::new(__input)
22031 };
22032 let mut __struct = Self::default();
22033 __struct.param1 = buf.get_f32_le()?;
22034 __struct.param2 = buf.get_f32_le()?;
22035 __struct.param3 = buf.get_f32_le()?;
22036 __struct.param4 = buf.get_f32_le()?;
22037 __struct.x = buf.get_i32_le()?;
22038 __struct.y = buf.get_i32_le()?;
22039 __struct.z = buf.get_f32_le()?;
22040 __struct.seq = buf.get_u16_le()?;
22041 let tmp = buf.get_u16_le()?;
22042 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
22043 ::mavlink_core::error::ParserError::InvalidEnum {
22044 enum_type: "MavCmd",
22045 value: tmp as u64,
22046 },
22047 )?;
22048 __struct.target_system = buf.get_u8()?;
22049 __struct.target_component = buf.get_u8()?;
22050 let tmp = buf.get_u8()?;
22051 __struct.frame =
22052 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22053 enum_type: "MavFrame",
22054 value: tmp as u64,
22055 })?;
22056 __struct.current = buf.get_u8()?;
22057 __struct.autocontinue = buf.get_u8()?;
22058 let tmp = buf.get_u8()?;
22059 __struct.mission_type =
22060 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22061 enum_type: "MavMissionType",
22062 value: tmp as u64,
22063 })?;
22064 Ok(__struct)
22065 }
22066 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22067 let mut __tmp = BytesMut::new(bytes);
22068 #[allow(clippy::absurd_extreme_comparisons)]
22069 #[allow(unused_comparisons)]
22070 if __tmp.remaining() < Self::ENCODED_LEN {
22071 panic!(
22072 "buffer is too small (need {} bytes, but got {})",
22073 Self::ENCODED_LEN,
22074 __tmp.remaining(),
22075 )
22076 }
22077 __tmp.put_f32_le(self.param1);
22078 __tmp.put_f32_le(self.param2);
22079 __tmp.put_f32_le(self.param3);
22080 __tmp.put_f32_le(self.param4);
22081 __tmp.put_i32_le(self.x);
22082 __tmp.put_i32_le(self.y);
22083 __tmp.put_f32_le(self.z);
22084 __tmp.put_u16_le(self.seq);
22085 __tmp.put_u16_le(self.command as u16);
22086 __tmp.put_u8(self.target_system);
22087 __tmp.put_u8(self.target_component);
22088 __tmp.put_u8(self.frame as u8);
22089 __tmp.put_u8(self.current);
22090 __tmp.put_u8(self.autocontinue);
22091 if matches!(version, MavlinkVersion::V2) {
22092 __tmp.put_u8(self.mission_type as u8);
22093 let len = __tmp.len();
22094 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22095 } else {
22096 __tmp.len()
22097 }
22098 }
22099}
22100#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
22101#[doc = ""]
22102#[doc = "ID: 46"]
22103#[derive(Debug, Clone, PartialEq)]
22104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22106#[cfg_attr(feature = "ts", derive(TS))]
22107#[cfg_attr(feature = "ts", ts(export))]
22108pub struct MISSION_ITEM_REACHED_DATA {
22109 #[doc = "Sequence"]
22110 pub seq: u16,
22111}
22112impl MISSION_ITEM_REACHED_DATA {
22113 pub const ENCODED_LEN: usize = 2usize;
22114 pub const DEFAULT: Self = Self { seq: 0_u16 };
22115 #[cfg(feature = "arbitrary")]
22116 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22117 use arbitrary::{Arbitrary, Unstructured};
22118 let mut buf = [0u8; 1024];
22119 rng.fill_bytes(&mut buf);
22120 let mut unstructured = Unstructured::new(&buf);
22121 Self::arbitrary(&mut unstructured).unwrap_or_default()
22122 }
22123}
22124impl Default for MISSION_ITEM_REACHED_DATA {
22125 fn default() -> Self {
22126 Self::DEFAULT.clone()
22127 }
22128}
22129impl MessageData for MISSION_ITEM_REACHED_DATA {
22130 type Message = MavMessage;
22131 const ID: u32 = 46u32;
22132 const NAME: &'static str = "MISSION_ITEM_REACHED";
22133 const EXTRA_CRC: u8 = 11u8;
22134 const ENCODED_LEN: usize = 2usize;
22135 fn deser(
22136 _version: MavlinkVersion,
22137 __input: &[u8],
22138 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22139 let avail_len = __input.len();
22140 let mut payload_buf = [0; Self::ENCODED_LEN];
22141 let mut buf = if avail_len < Self::ENCODED_LEN {
22142 payload_buf[0..avail_len].copy_from_slice(__input);
22143 Bytes::new(&payload_buf)
22144 } else {
22145 Bytes::new(__input)
22146 };
22147 let mut __struct = Self::default();
22148 __struct.seq = buf.get_u16_le()?;
22149 Ok(__struct)
22150 }
22151 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22152 let mut __tmp = BytesMut::new(bytes);
22153 #[allow(clippy::absurd_extreme_comparisons)]
22154 #[allow(unused_comparisons)]
22155 if __tmp.remaining() < Self::ENCODED_LEN {
22156 panic!(
22157 "buffer is too small (need {} bytes, but got {})",
22158 Self::ENCODED_LEN,
22159 __tmp.remaining(),
22160 )
22161 }
22162 __tmp.put_u16_le(self.seq);
22163 if matches!(version, MavlinkVersion::V2) {
22164 let len = __tmp.len();
22165 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22166 } else {
22167 __tmp.len()
22168 }
22169 }
22170}
22171#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
22172#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
22173#[doc = ""]
22174#[doc = "ID: 40"]
22175#[derive(Debug, Clone, PartialEq)]
22176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22178#[cfg_attr(feature = "ts", derive(TS))]
22179#[cfg_attr(feature = "ts", ts(export))]
22180pub struct MISSION_REQUEST_DATA {
22181 #[doc = "Sequence"]
22182 pub seq: u16,
22183 #[doc = "System ID"]
22184 pub target_system: u8,
22185 #[doc = "Component ID"]
22186 pub target_component: u8,
22187 #[doc = "Mission type."]
22188 #[cfg_attr(feature = "serde", serde(default))]
22189 pub mission_type: MavMissionType,
22190}
22191impl MISSION_REQUEST_DATA {
22192 pub const ENCODED_LEN: usize = 5usize;
22193 pub const DEFAULT: Self = Self {
22194 seq: 0_u16,
22195 target_system: 0_u8,
22196 target_component: 0_u8,
22197 mission_type: MavMissionType::DEFAULT,
22198 };
22199 #[cfg(feature = "arbitrary")]
22200 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22201 use arbitrary::{Arbitrary, Unstructured};
22202 let mut buf = [0u8; 1024];
22203 rng.fill_bytes(&mut buf);
22204 let mut unstructured = Unstructured::new(&buf);
22205 Self::arbitrary(&mut unstructured).unwrap_or_default()
22206 }
22207}
22208impl Default for MISSION_REQUEST_DATA {
22209 fn default() -> Self {
22210 Self::DEFAULT.clone()
22211 }
22212}
22213impl MessageData for MISSION_REQUEST_DATA {
22214 type Message = MavMessage;
22215 const ID: u32 = 40u32;
22216 const NAME: &'static str = "MISSION_REQUEST";
22217 const EXTRA_CRC: u8 = 230u8;
22218 const ENCODED_LEN: usize = 5usize;
22219 fn deser(
22220 _version: MavlinkVersion,
22221 __input: &[u8],
22222 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22223 let avail_len = __input.len();
22224 let mut payload_buf = [0; Self::ENCODED_LEN];
22225 let mut buf = if avail_len < Self::ENCODED_LEN {
22226 payload_buf[0..avail_len].copy_from_slice(__input);
22227 Bytes::new(&payload_buf)
22228 } else {
22229 Bytes::new(__input)
22230 };
22231 let mut __struct = Self::default();
22232 __struct.seq = buf.get_u16_le()?;
22233 __struct.target_system = buf.get_u8()?;
22234 __struct.target_component = buf.get_u8()?;
22235 let tmp = buf.get_u8()?;
22236 __struct.mission_type =
22237 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22238 enum_type: "MavMissionType",
22239 value: tmp as u64,
22240 })?;
22241 Ok(__struct)
22242 }
22243 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22244 let mut __tmp = BytesMut::new(bytes);
22245 #[allow(clippy::absurd_extreme_comparisons)]
22246 #[allow(unused_comparisons)]
22247 if __tmp.remaining() < Self::ENCODED_LEN {
22248 panic!(
22249 "buffer is too small (need {} bytes, but got {})",
22250 Self::ENCODED_LEN,
22251 __tmp.remaining(),
22252 )
22253 }
22254 __tmp.put_u16_le(self.seq);
22255 __tmp.put_u8(self.target_system);
22256 __tmp.put_u8(self.target_component);
22257 if matches!(version, MavlinkVersion::V2) {
22258 __tmp.put_u8(self.mission_type as u8);
22259 let len = __tmp.len();
22260 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22261 } else {
22262 __tmp.len()
22263 }
22264 }
22265}
22266#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
22267#[doc = ""]
22268#[doc = "ID: 51"]
22269#[derive(Debug, Clone, PartialEq)]
22270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22272#[cfg_attr(feature = "ts", derive(TS))]
22273#[cfg_attr(feature = "ts", ts(export))]
22274pub struct MISSION_REQUEST_INT_DATA {
22275 #[doc = "Sequence"]
22276 pub seq: u16,
22277 #[doc = "System ID"]
22278 pub target_system: u8,
22279 #[doc = "Component ID"]
22280 pub target_component: u8,
22281 #[doc = "Mission type."]
22282 #[cfg_attr(feature = "serde", serde(default))]
22283 pub mission_type: MavMissionType,
22284}
22285impl MISSION_REQUEST_INT_DATA {
22286 pub const ENCODED_LEN: usize = 5usize;
22287 pub const DEFAULT: Self = Self {
22288 seq: 0_u16,
22289 target_system: 0_u8,
22290 target_component: 0_u8,
22291 mission_type: MavMissionType::DEFAULT,
22292 };
22293 #[cfg(feature = "arbitrary")]
22294 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22295 use arbitrary::{Arbitrary, Unstructured};
22296 let mut buf = [0u8; 1024];
22297 rng.fill_bytes(&mut buf);
22298 let mut unstructured = Unstructured::new(&buf);
22299 Self::arbitrary(&mut unstructured).unwrap_or_default()
22300 }
22301}
22302impl Default for MISSION_REQUEST_INT_DATA {
22303 fn default() -> Self {
22304 Self::DEFAULT.clone()
22305 }
22306}
22307impl MessageData for MISSION_REQUEST_INT_DATA {
22308 type Message = MavMessage;
22309 const ID: u32 = 51u32;
22310 const NAME: &'static str = "MISSION_REQUEST_INT";
22311 const EXTRA_CRC: u8 = 196u8;
22312 const ENCODED_LEN: usize = 5usize;
22313 fn deser(
22314 _version: MavlinkVersion,
22315 __input: &[u8],
22316 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22317 let avail_len = __input.len();
22318 let mut payload_buf = [0; Self::ENCODED_LEN];
22319 let mut buf = if avail_len < Self::ENCODED_LEN {
22320 payload_buf[0..avail_len].copy_from_slice(__input);
22321 Bytes::new(&payload_buf)
22322 } else {
22323 Bytes::new(__input)
22324 };
22325 let mut __struct = Self::default();
22326 __struct.seq = buf.get_u16_le()?;
22327 __struct.target_system = buf.get_u8()?;
22328 __struct.target_component = buf.get_u8()?;
22329 let tmp = buf.get_u8()?;
22330 __struct.mission_type =
22331 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22332 enum_type: "MavMissionType",
22333 value: tmp as u64,
22334 })?;
22335 Ok(__struct)
22336 }
22337 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22338 let mut __tmp = BytesMut::new(bytes);
22339 #[allow(clippy::absurd_extreme_comparisons)]
22340 #[allow(unused_comparisons)]
22341 if __tmp.remaining() < Self::ENCODED_LEN {
22342 panic!(
22343 "buffer is too small (need {} bytes, but got {})",
22344 Self::ENCODED_LEN,
22345 __tmp.remaining(),
22346 )
22347 }
22348 __tmp.put_u16_le(self.seq);
22349 __tmp.put_u8(self.target_system);
22350 __tmp.put_u8(self.target_component);
22351 if matches!(version, MavlinkVersion::V2) {
22352 __tmp.put_u8(self.mission_type as u8);
22353 let len = __tmp.len();
22354 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22355 } else {
22356 __tmp.len()
22357 }
22358 }
22359}
22360#[doc = "Request the overall list of mission items from the system/component."]
22361#[doc = ""]
22362#[doc = "ID: 43"]
22363#[derive(Debug, Clone, PartialEq)]
22364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22366#[cfg_attr(feature = "ts", derive(TS))]
22367#[cfg_attr(feature = "ts", ts(export))]
22368pub struct MISSION_REQUEST_LIST_DATA {
22369 #[doc = "System ID"]
22370 pub target_system: u8,
22371 #[doc = "Component ID"]
22372 pub target_component: u8,
22373 #[doc = "Mission type."]
22374 #[cfg_attr(feature = "serde", serde(default))]
22375 pub mission_type: MavMissionType,
22376}
22377impl MISSION_REQUEST_LIST_DATA {
22378 pub const ENCODED_LEN: usize = 3usize;
22379 pub const DEFAULT: Self = Self {
22380 target_system: 0_u8,
22381 target_component: 0_u8,
22382 mission_type: MavMissionType::DEFAULT,
22383 };
22384 #[cfg(feature = "arbitrary")]
22385 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22386 use arbitrary::{Arbitrary, Unstructured};
22387 let mut buf = [0u8; 1024];
22388 rng.fill_bytes(&mut buf);
22389 let mut unstructured = Unstructured::new(&buf);
22390 Self::arbitrary(&mut unstructured).unwrap_or_default()
22391 }
22392}
22393impl Default for MISSION_REQUEST_LIST_DATA {
22394 fn default() -> Self {
22395 Self::DEFAULT.clone()
22396 }
22397}
22398impl MessageData for MISSION_REQUEST_LIST_DATA {
22399 type Message = MavMessage;
22400 const ID: u32 = 43u32;
22401 const NAME: &'static str = "MISSION_REQUEST_LIST";
22402 const EXTRA_CRC: u8 = 132u8;
22403 const ENCODED_LEN: usize = 3usize;
22404 fn deser(
22405 _version: MavlinkVersion,
22406 __input: &[u8],
22407 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22408 let avail_len = __input.len();
22409 let mut payload_buf = [0; Self::ENCODED_LEN];
22410 let mut buf = if avail_len < Self::ENCODED_LEN {
22411 payload_buf[0..avail_len].copy_from_slice(__input);
22412 Bytes::new(&payload_buf)
22413 } else {
22414 Bytes::new(__input)
22415 };
22416 let mut __struct = Self::default();
22417 __struct.target_system = buf.get_u8()?;
22418 __struct.target_component = buf.get_u8()?;
22419 let tmp = buf.get_u8()?;
22420 __struct.mission_type =
22421 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22422 enum_type: "MavMissionType",
22423 value: tmp as u64,
22424 })?;
22425 Ok(__struct)
22426 }
22427 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22428 let mut __tmp = BytesMut::new(bytes);
22429 #[allow(clippy::absurd_extreme_comparisons)]
22430 #[allow(unused_comparisons)]
22431 if __tmp.remaining() < Self::ENCODED_LEN {
22432 panic!(
22433 "buffer is too small (need {} bytes, but got {})",
22434 Self::ENCODED_LEN,
22435 __tmp.remaining(),
22436 )
22437 }
22438 __tmp.put_u8(self.target_system);
22439 __tmp.put_u8(self.target_component);
22440 if matches!(version, MavlinkVersion::V2) {
22441 __tmp.put_u8(self.mission_type as u8);
22442 let len = __tmp.len();
22443 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22444 } else {
22445 __tmp.len()
22446 }
22447 }
22448}
22449#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
22450#[doc = ""]
22451#[doc = "ID: 37"]
22452#[derive(Debug, Clone, PartialEq)]
22453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22455#[cfg_attr(feature = "ts", derive(TS))]
22456#[cfg_attr(feature = "ts", ts(export))]
22457pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
22458 #[doc = "Start index"]
22459 pub start_index: i16,
22460 #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
22461 pub end_index: i16,
22462 #[doc = "System ID"]
22463 pub target_system: u8,
22464 #[doc = "Component ID"]
22465 pub target_component: u8,
22466 #[doc = "Mission type."]
22467 #[cfg_attr(feature = "serde", serde(default))]
22468 pub mission_type: MavMissionType,
22469}
22470impl MISSION_REQUEST_PARTIAL_LIST_DATA {
22471 pub const ENCODED_LEN: usize = 7usize;
22472 pub const DEFAULT: Self = Self {
22473 start_index: 0_i16,
22474 end_index: 0_i16,
22475 target_system: 0_u8,
22476 target_component: 0_u8,
22477 mission_type: MavMissionType::DEFAULT,
22478 };
22479 #[cfg(feature = "arbitrary")]
22480 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22481 use arbitrary::{Arbitrary, Unstructured};
22482 let mut buf = [0u8; 1024];
22483 rng.fill_bytes(&mut buf);
22484 let mut unstructured = Unstructured::new(&buf);
22485 Self::arbitrary(&mut unstructured).unwrap_or_default()
22486 }
22487}
22488impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
22489 fn default() -> Self {
22490 Self::DEFAULT.clone()
22491 }
22492}
22493impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
22494 type Message = MavMessage;
22495 const ID: u32 = 37u32;
22496 const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
22497 const EXTRA_CRC: u8 = 212u8;
22498 const ENCODED_LEN: usize = 7usize;
22499 fn deser(
22500 _version: MavlinkVersion,
22501 __input: &[u8],
22502 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22503 let avail_len = __input.len();
22504 let mut payload_buf = [0; Self::ENCODED_LEN];
22505 let mut buf = if avail_len < Self::ENCODED_LEN {
22506 payload_buf[0..avail_len].copy_from_slice(__input);
22507 Bytes::new(&payload_buf)
22508 } else {
22509 Bytes::new(__input)
22510 };
22511 let mut __struct = Self::default();
22512 __struct.start_index = buf.get_i16_le()?;
22513 __struct.end_index = buf.get_i16_le()?;
22514 __struct.target_system = buf.get_u8()?;
22515 __struct.target_component = buf.get_u8()?;
22516 let tmp = buf.get_u8()?;
22517 __struct.mission_type =
22518 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22519 enum_type: "MavMissionType",
22520 value: tmp as u64,
22521 })?;
22522 Ok(__struct)
22523 }
22524 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22525 let mut __tmp = BytesMut::new(bytes);
22526 #[allow(clippy::absurd_extreme_comparisons)]
22527 #[allow(unused_comparisons)]
22528 if __tmp.remaining() < Self::ENCODED_LEN {
22529 panic!(
22530 "buffer is too small (need {} bytes, but got {})",
22531 Self::ENCODED_LEN,
22532 __tmp.remaining(),
22533 )
22534 }
22535 __tmp.put_i16_le(self.start_index);
22536 __tmp.put_i16_le(self.end_index);
22537 __tmp.put_u8(self.target_system);
22538 __tmp.put_u8(self.target_component);
22539 if matches!(version, MavlinkVersion::V2) {
22540 __tmp.put_u8(self.mission_type as u8);
22541 let len = __tmp.len();
22542 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22543 } else {
22544 __tmp.len()
22545 }
22546 }
22547}
22548#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
22549#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2). This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. If the system is not in mission mode this message must not trigger a switch to mission mode."]
22550#[doc = ""]
22551#[doc = "ID: 41"]
22552#[derive(Debug, Clone, PartialEq)]
22553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22555#[cfg_attr(feature = "ts", derive(TS))]
22556#[cfg_attr(feature = "ts", ts(export))]
22557pub struct MISSION_SET_CURRENT_DATA {
22558 #[doc = "Sequence"]
22559 pub seq: u16,
22560 #[doc = "System ID"]
22561 pub target_system: u8,
22562 #[doc = "Component ID"]
22563 pub target_component: u8,
22564}
22565impl MISSION_SET_CURRENT_DATA {
22566 pub const ENCODED_LEN: usize = 4usize;
22567 pub const DEFAULT: Self = Self {
22568 seq: 0_u16,
22569 target_system: 0_u8,
22570 target_component: 0_u8,
22571 };
22572 #[cfg(feature = "arbitrary")]
22573 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22574 use arbitrary::{Arbitrary, Unstructured};
22575 let mut buf = [0u8; 1024];
22576 rng.fill_bytes(&mut buf);
22577 let mut unstructured = Unstructured::new(&buf);
22578 Self::arbitrary(&mut unstructured).unwrap_or_default()
22579 }
22580}
22581impl Default for MISSION_SET_CURRENT_DATA {
22582 fn default() -> Self {
22583 Self::DEFAULT.clone()
22584 }
22585}
22586impl MessageData for MISSION_SET_CURRENT_DATA {
22587 type Message = MavMessage;
22588 const ID: u32 = 41u32;
22589 const NAME: &'static str = "MISSION_SET_CURRENT";
22590 const EXTRA_CRC: u8 = 28u8;
22591 const ENCODED_LEN: usize = 4usize;
22592 fn deser(
22593 _version: MavlinkVersion,
22594 __input: &[u8],
22595 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22596 let avail_len = __input.len();
22597 let mut payload_buf = [0; Self::ENCODED_LEN];
22598 let mut buf = if avail_len < Self::ENCODED_LEN {
22599 payload_buf[0..avail_len].copy_from_slice(__input);
22600 Bytes::new(&payload_buf)
22601 } else {
22602 Bytes::new(__input)
22603 };
22604 let mut __struct = Self::default();
22605 __struct.seq = buf.get_u16_le()?;
22606 __struct.target_system = buf.get_u8()?;
22607 __struct.target_component = buf.get_u8()?;
22608 Ok(__struct)
22609 }
22610 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22611 let mut __tmp = BytesMut::new(bytes);
22612 #[allow(clippy::absurd_extreme_comparisons)]
22613 #[allow(unused_comparisons)]
22614 if __tmp.remaining() < Self::ENCODED_LEN {
22615 panic!(
22616 "buffer is too small (need {} bytes, but got {})",
22617 Self::ENCODED_LEN,
22618 __tmp.remaining(),
22619 )
22620 }
22621 __tmp.put_u16_le(self.seq);
22622 __tmp.put_u8(self.target_system);
22623 __tmp.put_u8(self.target_component);
22624 if matches!(version, MavlinkVersion::V2) {
22625 let len = __tmp.len();
22626 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22627 } else {
22628 __tmp.len()
22629 }
22630 }
22631}
22632#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
22633#[doc = ""]
22634#[doc = "ID: 38"]
22635#[derive(Debug, Clone, PartialEq)]
22636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22638#[cfg_attr(feature = "ts", derive(TS))]
22639#[cfg_attr(feature = "ts", ts(export))]
22640pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
22641 #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
22642 pub start_index: i16,
22643 #[doc = "End index, equal or greater than start index."]
22644 pub end_index: i16,
22645 #[doc = "System ID"]
22646 pub target_system: u8,
22647 #[doc = "Component ID"]
22648 pub target_component: u8,
22649 #[doc = "Mission type."]
22650 #[cfg_attr(feature = "serde", serde(default))]
22651 pub mission_type: MavMissionType,
22652}
22653impl MISSION_WRITE_PARTIAL_LIST_DATA {
22654 pub const ENCODED_LEN: usize = 7usize;
22655 pub const DEFAULT: Self = Self {
22656 start_index: 0_i16,
22657 end_index: 0_i16,
22658 target_system: 0_u8,
22659 target_component: 0_u8,
22660 mission_type: MavMissionType::DEFAULT,
22661 };
22662 #[cfg(feature = "arbitrary")]
22663 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22664 use arbitrary::{Arbitrary, Unstructured};
22665 let mut buf = [0u8; 1024];
22666 rng.fill_bytes(&mut buf);
22667 let mut unstructured = Unstructured::new(&buf);
22668 Self::arbitrary(&mut unstructured).unwrap_or_default()
22669 }
22670}
22671impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
22672 fn default() -> Self {
22673 Self::DEFAULT.clone()
22674 }
22675}
22676impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
22677 type Message = MavMessage;
22678 const ID: u32 = 38u32;
22679 const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
22680 const EXTRA_CRC: u8 = 9u8;
22681 const ENCODED_LEN: usize = 7usize;
22682 fn deser(
22683 _version: MavlinkVersion,
22684 __input: &[u8],
22685 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22686 let avail_len = __input.len();
22687 let mut payload_buf = [0; Self::ENCODED_LEN];
22688 let mut buf = if avail_len < Self::ENCODED_LEN {
22689 payload_buf[0..avail_len].copy_from_slice(__input);
22690 Bytes::new(&payload_buf)
22691 } else {
22692 Bytes::new(__input)
22693 };
22694 let mut __struct = Self::default();
22695 __struct.start_index = buf.get_i16_le()?;
22696 __struct.end_index = buf.get_i16_le()?;
22697 __struct.target_system = buf.get_u8()?;
22698 __struct.target_component = buf.get_u8()?;
22699 let tmp = buf.get_u8()?;
22700 __struct.mission_type =
22701 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22702 enum_type: "MavMissionType",
22703 value: tmp as u64,
22704 })?;
22705 Ok(__struct)
22706 }
22707 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22708 let mut __tmp = BytesMut::new(bytes);
22709 #[allow(clippy::absurd_extreme_comparisons)]
22710 #[allow(unused_comparisons)]
22711 if __tmp.remaining() < Self::ENCODED_LEN {
22712 panic!(
22713 "buffer is too small (need {} bytes, but got {})",
22714 Self::ENCODED_LEN,
22715 __tmp.remaining(),
22716 )
22717 }
22718 __tmp.put_i16_le(self.start_index);
22719 __tmp.put_i16_le(self.end_index);
22720 __tmp.put_u8(self.target_system);
22721 __tmp.put_u8(self.target_component);
22722 if matches!(version, MavlinkVersion::V2) {
22723 __tmp.put_u8(self.mission_type as u8);
22724 let len = __tmp.len();
22725 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22726 } else {
22727 __tmp.len()
22728 }
22729 }
22730}
22731#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
22732#[doc = "Orientation of a mount."]
22733#[doc = ""]
22734#[doc = "ID: 265"]
22735#[derive(Debug, Clone, PartialEq)]
22736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22738#[cfg_attr(feature = "ts", derive(TS))]
22739#[cfg_attr(feature = "ts", ts(export))]
22740pub struct MOUNT_ORIENTATION_DATA {
22741 #[doc = "Timestamp (time since system boot)."]
22742 pub time_boot_ms: u32,
22743 #[doc = "Roll in global frame (set to NaN for invalid)."]
22744 pub roll: f32,
22745 #[doc = "Pitch in global frame (set to NaN for invalid)."]
22746 pub pitch: f32,
22747 #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
22748 pub yaw: f32,
22749 #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
22750 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22751 pub yaw_absolute: f32,
22752}
22753impl MOUNT_ORIENTATION_DATA {
22754 pub const ENCODED_LEN: usize = 20usize;
22755 pub const DEFAULT: Self = Self {
22756 time_boot_ms: 0_u32,
22757 roll: 0.0_f32,
22758 pitch: 0.0_f32,
22759 yaw: 0.0_f32,
22760 yaw_absolute: 0.0_f32,
22761 };
22762 #[cfg(feature = "arbitrary")]
22763 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22764 use arbitrary::{Arbitrary, Unstructured};
22765 let mut buf = [0u8; 1024];
22766 rng.fill_bytes(&mut buf);
22767 let mut unstructured = Unstructured::new(&buf);
22768 Self::arbitrary(&mut unstructured).unwrap_or_default()
22769 }
22770}
22771impl Default for MOUNT_ORIENTATION_DATA {
22772 fn default() -> Self {
22773 Self::DEFAULT.clone()
22774 }
22775}
22776impl MessageData for MOUNT_ORIENTATION_DATA {
22777 type Message = MavMessage;
22778 const ID: u32 = 265u32;
22779 const NAME: &'static str = "MOUNT_ORIENTATION";
22780 const EXTRA_CRC: u8 = 26u8;
22781 const ENCODED_LEN: usize = 20usize;
22782 fn deser(
22783 _version: MavlinkVersion,
22784 __input: &[u8],
22785 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22786 let avail_len = __input.len();
22787 let mut payload_buf = [0; Self::ENCODED_LEN];
22788 let mut buf = if avail_len < Self::ENCODED_LEN {
22789 payload_buf[0..avail_len].copy_from_slice(__input);
22790 Bytes::new(&payload_buf)
22791 } else {
22792 Bytes::new(__input)
22793 };
22794 let mut __struct = Self::default();
22795 __struct.time_boot_ms = buf.get_u32_le()?;
22796 __struct.roll = buf.get_f32_le()?;
22797 __struct.pitch = buf.get_f32_le()?;
22798 __struct.yaw = buf.get_f32_le()?;
22799 __struct.yaw_absolute = buf.get_f32_le()?;
22800 Ok(__struct)
22801 }
22802 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22803 let mut __tmp = BytesMut::new(bytes);
22804 #[allow(clippy::absurd_extreme_comparisons)]
22805 #[allow(unused_comparisons)]
22806 if __tmp.remaining() < Self::ENCODED_LEN {
22807 panic!(
22808 "buffer is too small (need {} bytes, but got {})",
22809 Self::ENCODED_LEN,
22810 __tmp.remaining(),
22811 )
22812 }
22813 __tmp.put_u32_le(self.time_boot_ms);
22814 __tmp.put_f32_le(self.roll);
22815 __tmp.put_f32_le(self.pitch);
22816 __tmp.put_f32_le(self.yaw);
22817 if matches!(version, MavlinkVersion::V2) {
22818 __tmp.put_f32_le(self.yaw_absolute);
22819 let len = __tmp.len();
22820 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22821 } else {
22822 __tmp.len()
22823 }
22824 }
22825}
22826#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
22827#[doc = ""]
22828#[doc = "ID: 251"]
22829#[derive(Debug, Clone, PartialEq)]
22830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22832#[cfg_attr(feature = "ts", derive(TS))]
22833#[cfg_attr(feature = "ts", ts(export))]
22834pub struct NAMED_VALUE_FLOAT_DATA {
22835 #[doc = "Timestamp (time since system boot)."]
22836 pub time_boot_ms: u32,
22837 #[doc = "Floating point value"]
22838 pub value: f32,
22839 #[doc = "Name of the debug variable"]
22840 #[cfg_attr(feature = "ts", ts(type = "string"))]
22841 pub name: CharArray<10>,
22842}
22843impl NAMED_VALUE_FLOAT_DATA {
22844 pub const ENCODED_LEN: usize = 18usize;
22845 pub const DEFAULT: Self = Self {
22846 time_boot_ms: 0_u32,
22847 value: 0.0_f32,
22848 name: CharArray::new([0_u8; 10usize]),
22849 };
22850 #[cfg(feature = "arbitrary")]
22851 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22852 use arbitrary::{Arbitrary, Unstructured};
22853 let mut buf = [0u8; 1024];
22854 rng.fill_bytes(&mut buf);
22855 let mut unstructured = Unstructured::new(&buf);
22856 Self::arbitrary(&mut unstructured).unwrap_or_default()
22857 }
22858}
22859impl Default for NAMED_VALUE_FLOAT_DATA {
22860 fn default() -> Self {
22861 Self::DEFAULT.clone()
22862 }
22863}
22864impl MessageData for NAMED_VALUE_FLOAT_DATA {
22865 type Message = MavMessage;
22866 const ID: u32 = 251u32;
22867 const NAME: &'static str = "NAMED_VALUE_FLOAT";
22868 const EXTRA_CRC: u8 = 170u8;
22869 const ENCODED_LEN: usize = 18usize;
22870 fn deser(
22871 _version: MavlinkVersion,
22872 __input: &[u8],
22873 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22874 let avail_len = __input.len();
22875 let mut payload_buf = [0; Self::ENCODED_LEN];
22876 let mut buf = if avail_len < Self::ENCODED_LEN {
22877 payload_buf[0..avail_len].copy_from_slice(__input);
22878 Bytes::new(&payload_buf)
22879 } else {
22880 Bytes::new(__input)
22881 };
22882 let mut __struct = Self::default();
22883 __struct.time_boot_ms = buf.get_u32_le()?;
22884 __struct.value = buf.get_f32_le()?;
22885 let mut tmp = [0_u8; 10usize];
22886 for v in &mut tmp {
22887 *v = buf.get_u8()?;
22888 }
22889 __struct.name = CharArray::new(tmp);
22890 Ok(__struct)
22891 }
22892 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22893 let mut __tmp = BytesMut::new(bytes);
22894 #[allow(clippy::absurd_extreme_comparisons)]
22895 #[allow(unused_comparisons)]
22896 if __tmp.remaining() < Self::ENCODED_LEN {
22897 panic!(
22898 "buffer is too small (need {} bytes, but got {})",
22899 Self::ENCODED_LEN,
22900 __tmp.remaining(),
22901 )
22902 }
22903 __tmp.put_u32_le(self.time_boot_ms);
22904 __tmp.put_f32_le(self.value);
22905 for val in &self.name {
22906 __tmp.put_u8(*val);
22907 }
22908 if matches!(version, MavlinkVersion::V2) {
22909 let len = __tmp.len();
22910 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22911 } else {
22912 __tmp.len()
22913 }
22914 }
22915}
22916#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
22917#[doc = ""]
22918#[doc = "ID: 252"]
22919#[derive(Debug, Clone, PartialEq)]
22920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22922#[cfg_attr(feature = "ts", derive(TS))]
22923#[cfg_attr(feature = "ts", ts(export))]
22924pub struct NAMED_VALUE_INT_DATA {
22925 #[doc = "Timestamp (time since system boot)."]
22926 pub time_boot_ms: u32,
22927 #[doc = "Signed integer value"]
22928 pub value: i32,
22929 #[doc = "Name of the debug variable"]
22930 #[cfg_attr(feature = "ts", ts(type = "string"))]
22931 pub name: CharArray<10>,
22932}
22933impl NAMED_VALUE_INT_DATA {
22934 pub const ENCODED_LEN: usize = 18usize;
22935 pub const DEFAULT: Self = Self {
22936 time_boot_ms: 0_u32,
22937 value: 0_i32,
22938 name: CharArray::new([0_u8; 10usize]),
22939 };
22940 #[cfg(feature = "arbitrary")]
22941 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22942 use arbitrary::{Arbitrary, Unstructured};
22943 let mut buf = [0u8; 1024];
22944 rng.fill_bytes(&mut buf);
22945 let mut unstructured = Unstructured::new(&buf);
22946 Self::arbitrary(&mut unstructured).unwrap_or_default()
22947 }
22948}
22949impl Default for NAMED_VALUE_INT_DATA {
22950 fn default() -> Self {
22951 Self::DEFAULT.clone()
22952 }
22953}
22954impl MessageData for NAMED_VALUE_INT_DATA {
22955 type Message = MavMessage;
22956 const ID: u32 = 252u32;
22957 const NAME: &'static str = "NAMED_VALUE_INT";
22958 const EXTRA_CRC: u8 = 44u8;
22959 const ENCODED_LEN: usize = 18usize;
22960 fn deser(
22961 _version: MavlinkVersion,
22962 __input: &[u8],
22963 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22964 let avail_len = __input.len();
22965 let mut payload_buf = [0; Self::ENCODED_LEN];
22966 let mut buf = if avail_len < Self::ENCODED_LEN {
22967 payload_buf[0..avail_len].copy_from_slice(__input);
22968 Bytes::new(&payload_buf)
22969 } else {
22970 Bytes::new(__input)
22971 };
22972 let mut __struct = Self::default();
22973 __struct.time_boot_ms = buf.get_u32_le()?;
22974 __struct.value = buf.get_i32_le()?;
22975 let mut tmp = [0_u8; 10usize];
22976 for v in &mut tmp {
22977 *v = buf.get_u8()?;
22978 }
22979 __struct.name = CharArray::new(tmp);
22980 Ok(__struct)
22981 }
22982 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22983 let mut __tmp = BytesMut::new(bytes);
22984 #[allow(clippy::absurd_extreme_comparisons)]
22985 #[allow(unused_comparisons)]
22986 if __tmp.remaining() < Self::ENCODED_LEN {
22987 panic!(
22988 "buffer is too small (need {} bytes, but got {})",
22989 Self::ENCODED_LEN,
22990 __tmp.remaining(),
22991 )
22992 }
22993 __tmp.put_u32_le(self.time_boot_ms);
22994 __tmp.put_i32_le(self.value);
22995 for val in &self.name {
22996 __tmp.put_u8(*val);
22997 }
22998 if matches!(version, MavlinkVersion::V2) {
22999 let len = __tmp.len();
23000 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23001 } else {
23002 __tmp.len()
23003 }
23004 }
23005}
23006#[doc = "The state of the navigation and position controller."]
23007#[doc = ""]
23008#[doc = "ID: 62"]
23009#[derive(Debug, Clone, PartialEq)]
23010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23012#[cfg_attr(feature = "ts", derive(TS))]
23013#[cfg_attr(feature = "ts", ts(export))]
23014pub struct NAV_CONTROLLER_OUTPUT_DATA {
23015 #[doc = "Current desired roll"]
23016 pub nav_roll: f32,
23017 #[doc = "Current desired pitch"]
23018 pub nav_pitch: f32,
23019 #[doc = "Current altitude error"]
23020 pub alt_error: f32,
23021 #[doc = "Current airspeed error"]
23022 pub aspd_error: f32,
23023 #[doc = "Current crosstrack error on x-y plane"]
23024 pub xtrack_error: f32,
23025 #[doc = "Current desired heading"]
23026 pub nav_bearing: i16,
23027 #[doc = "Bearing to current waypoint/target"]
23028 pub target_bearing: i16,
23029 #[doc = "Distance to active waypoint"]
23030 pub wp_dist: u16,
23031}
23032impl NAV_CONTROLLER_OUTPUT_DATA {
23033 pub const ENCODED_LEN: usize = 26usize;
23034 pub const DEFAULT: Self = Self {
23035 nav_roll: 0.0_f32,
23036 nav_pitch: 0.0_f32,
23037 alt_error: 0.0_f32,
23038 aspd_error: 0.0_f32,
23039 xtrack_error: 0.0_f32,
23040 nav_bearing: 0_i16,
23041 target_bearing: 0_i16,
23042 wp_dist: 0_u16,
23043 };
23044 #[cfg(feature = "arbitrary")]
23045 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23046 use arbitrary::{Arbitrary, Unstructured};
23047 let mut buf = [0u8; 1024];
23048 rng.fill_bytes(&mut buf);
23049 let mut unstructured = Unstructured::new(&buf);
23050 Self::arbitrary(&mut unstructured).unwrap_or_default()
23051 }
23052}
23053impl Default for NAV_CONTROLLER_OUTPUT_DATA {
23054 fn default() -> Self {
23055 Self::DEFAULT.clone()
23056 }
23057}
23058impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
23059 type Message = MavMessage;
23060 const ID: u32 = 62u32;
23061 const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
23062 const EXTRA_CRC: u8 = 183u8;
23063 const ENCODED_LEN: usize = 26usize;
23064 fn deser(
23065 _version: MavlinkVersion,
23066 __input: &[u8],
23067 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23068 let avail_len = __input.len();
23069 let mut payload_buf = [0; Self::ENCODED_LEN];
23070 let mut buf = if avail_len < Self::ENCODED_LEN {
23071 payload_buf[0..avail_len].copy_from_slice(__input);
23072 Bytes::new(&payload_buf)
23073 } else {
23074 Bytes::new(__input)
23075 };
23076 let mut __struct = Self::default();
23077 __struct.nav_roll = buf.get_f32_le()?;
23078 __struct.nav_pitch = buf.get_f32_le()?;
23079 __struct.alt_error = buf.get_f32_le()?;
23080 __struct.aspd_error = buf.get_f32_le()?;
23081 __struct.xtrack_error = buf.get_f32_le()?;
23082 __struct.nav_bearing = buf.get_i16_le()?;
23083 __struct.target_bearing = buf.get_i16_le()?;
23084 __struct.wp_dist = buf.get_u16_le()?;
23085 Ok(__struct)
23086 }
23087 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23088 let mut __tmp = BytesMut::new(bytes);
23089 #[allow(clippy::absurd_extreme_comparisons)]
23090 #[allow(unused_comparisons)]
23091 if __tmp.remaining() < Self::ENCODED_LEN {
23092 panic!(
23093 "buffer is too small (need {} bytes, but got {})",
23094 Self::ENCODED_LEN,
23095 __tmp.remaining(),
23096 )
23097 }
23098 __tmp.put_f32_le(self.nav_roll);
23099 __tmp.put_f32_le(self.nav_pitch);
23100 __tmp.put_f32_le(self.alt_error);
23101 __tmp.put_f32_le(self.aspd_error);
23102 __tmp.put_f32_le(self.xtrack_error);
23103 __tmp.put_i16_le(self.nav_bearing);
23104 __tmp.put_i16_le(self.target_bearing);
23105 __tmp.put_u16_le(self.wp_dist);
23106 if matches!(version, MavlinkVersion::V2) {
23107 let len = __tmp.len();
23108 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23109 } else {
23110 __tmp.len()
23111 }
23112 }
23113}
23114#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
23115#[doc = ""]
23116#[doc = "ID: 330"]
23117#[derive(Debug, Clone, PartialEq)]
23118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23120#[cfg_attr(feature = "ts", derive(TS))]
23121#[cfg_attr(feature = "ts", ts(export))]
23122pub struct OBSTACLE_DISTANCE_DATA {
23123 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23124 pub time_usec: u64,
23125 #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
23126 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23127 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23128 pub distances: [u16; 72],
23129 #[doc = "Minimum distance the sensor can measure."]
23130 pub min_distance: u16,
23131 #[doc = "Maximum distance the sensor can measure."]
23132 pub max_distance: u16,
23133 #[doc = "Class id of the distance sensor type."]
23134 pub sensor_type: MavDistanceSensor,
23135 #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
23136 pub increment: u8,
23137 #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
23138 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23139 pub increment_f: f32,
23140 #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
23141 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23142 pub angle_offset: f32,
23143 #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
23144 #[cfg_attr(feature = "serde", serde(default))]
23145 pub frame: MavFrame,
23146}
23147impl OBSTACLE_DISTANCE_DATA {
23148 pub const ENCODED_LEN: usize = 167usize;
23149 pub const DEFAULT: Self = Self {
23150 time_usec: 0_u64,
23151 distances: [0_u16; 72usize],
23152 min_distance: 0_u16,
23153 max_distance: 0_u16,
23154 sensor_type: MavDistanceSensor::DEFAULT,
23155 increment: 0_u8,
23156 increment_f: 0.0_f32,
23157 angle_offset: 0.0_f32,
23158 frame: MavFrame::DEFAULT,
23159 };
23160 #[cfg(feature = "arbitrary")]
23161 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23162 use arbitrary::{Arbitrary, Unstructured};
23163 let mut buf = [0u8; 1024];
23164 rng.fill_bytes(&mut buf);
23165 let mut unstructured = Unstructured::new(&buf);
23166 Self::arbitrary(&mut unstructured).unwrap_or_default()
23167 }
23168}
23169impl Default for OBSTACLE_DISTANCE_DATA {
23170 fn default() -> Self {
23171 Self::DEFAULT.clone()
23172 }
23173}
23174impl MessageData for OBSTACLE_DISTANCE_DATA {
23175 type Message = MavMessage;
23176 const ID: u32 = 330u32;
23177 const NAME: &'static str = "OBSTACLE_DISTANCE";
23178 const EXTRA_CRC: u8 = 23u8;
23179 const ENCODED_LEN: usize = 167usize;
23180 fn deser(
23181 _version: MavlinkVersion,
23182 __input: &[u8],
23183 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23184 let avail_len = __input.len();
23185 let mut payload_buf = [0; Self::ENCODED_LEN];
23186 let mut buf = if avail_len < Self::ENCODED_LEN {
23187 payload_buf[0..avail_len].copy_from_slice(__input);
23188 Bytes::new(&payload_buf)
23189 } else {
23190 Bytes::new(__input)
23191 };
23192 let mut __struct = Self::default();
23193 __struct.time_usec = buf.get_u64_le()?;
23194 for v in &mut __struct.distances {
23195 let val = buf.get_u16_le()?;
23196 *v = val;
23197 }
23198 __struct.min_distance = buf.get_u16_le()?;
23199 __struct.max_distance = buf.get_u16_le()?;
23200 let tmp = buf.get_u8()?;
23201 __struct.sensor_type =
23202 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23203 enum_type: "MavDistanceSensor",
23204 value: tmp as u64,
23205 })?;
23206 __struct.increment = buf.get_u8()?;
23207 __struct.increment_f = buf.get_f32_le()?;
23208 __struct.angle_offset = buf.get_f32_le()?;
23209 let tmp = buf.get_u8()?;
23210 __struct.frame =
23211 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23212 enum_type: "MavFrame",
23213 value: tmp as u64,
23214 })?;
23215 Ok(__struct)
23216 }
23217 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23218 let mut __tmp = BytesMut::new(bytes);
23219 #[allow(clippy::absurd_extreme_comparisons)]
23220 #[allow(unused_comparisons)]
23221 if __tmp.remaining() < Self::ENCODED_LEN {
23222 panic!(
23223 "buffer is too small (need {} bytes, but got {})",
23224 Self::ENCODED_LEN,
23225 __tmp.remaining(),
23226 )
23227 }
23228 __tmp.put_u64_le(self.time_usec);
23229 for val in &self.distances {
23230 __tmp.put_u16_le(*val);
23231 }
23232 __tmp.put_u16_le(self.min_distance);
23233 __tmp.put_u16_le(self.max_distance);
23234 __tmp.put_u8(self.sensor_type as u8);
23235 __tmp.put_u8(self.increment);
23236 if matches!(version, MavlinkVersion::V2) {
23237 __tmp.put_f32_le(self.increment_f);
23238 __tmp.put_f32_le(self.angle_offset);
23239 __tmp.put_u8(self.frame as u8);
23240 let len = __tmp.len();
23241 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23242 } else {
23243 __tmp.len()
23244 }
23245 }
23246}
23247#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
23248#[doc = ""]
23249#[doc = "ID: 331"]
23250#[derive(Debug, Clone, PartialEq)]
23251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23253#[cfg_attr(feature = "ts", derive(TS))]
23254#[cfg_attr(feature = "ts", ts(export))]
23255pub struct ODOMETRY_DATA {
23256 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23257 pub time_usec: u64,
23258 #[doc = "X Position"]
23259 pub x: f32,
23260 #[doc = "Y Position"]
23261 pub y: f32,
23262 #[doc = "Z Position"]
23263 pub z: f32,
23264 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
23265 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23266 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23267 pub q: [f32; 4],
23268 #[doc = "X linear speed"]
23269 pub vx: f32,
23270 #[doc = "Y linear speed"]
23271 pub vy: f32,
23272 #[doc = "Z linear speed"]
23273 pub vz: f32,
23274 #[doc = "Roll angular speed"]
23275 pub rollspeed: f32,
23276 #[doc = "Pitch angular speed"]
23277 pub pitchspeed: f32,
23278 #[doc = "Yaw angular speed"]
23279 pub yawspeed: f32,
23280 #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
23281 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23282 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23283 pub pose_covariance: [f32; 21],
23284 #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
23285 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23286 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23287 pub velocity_covariance: [f32; 21],
23288 #[doc = "Coordinate frame of reference for the pose data."]
23289 pub frame_id: MavFrame,
23290 #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
23291 pub child_frame_id: MavFrame,
23292 #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
23293 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23294 pub reset_counter: u8,
23295 #[doc = "Type of estimator that is providing the odometry."]
23296 #[cfg_attr(feature = "serde", serde(default))]
23297 pub estimator_type: MavEstimatorType,
23298 #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
23299 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23300 pub quality: i8,
23301}
23302impl ODOMETRY_DATA {
23303 pub const ENCODED_LEN: usize = 233usize;
23304 pub const DEFAULT: Self = Self {
23305 time_usec: 0_u64,
23306 x: 0.0_f32,
23307 y: 0.0_f32,
23308 z: 0.0_f32,
23309 q: [0.0_f32; 4usize],
23310 vx: 0.0_f32,
23311 vy: 0.0_f32,
23312 vz: 0.0_f32,
23313 rollspeed: 0.0_f32,
23314 pitchspeed: 0.0_f32,
23315 yawspeed: 0.0_f32,
23316 pose_covariance: [0.0_f32; 21usize],
23317 velocity_covariance: [0.0_f32; 21usize],
23318 frame_id: MavFrame::DEFAULT,
23319 child_frame_id: MavFrame::DEFAULT,
23320 reset_counter: 0_u8,
23321 estimator_type: MavEstimatorType::DEFAULT,
23322 quality: 0_i8,
23323 };
23324 #[cfg(feature = "arbitrary")]
23325 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23326 use arbitrary::{Arbitrary, Unstructured};
23327 let mut buf = [0u8; 1024];
23328 rng.fill_bytes(&mut buf);
23329 let mut unstructured = Unstructured::new(&buf);
23330 Self::arbitrary(&mut unstructured).unwrap_or_default()
23331 }
23332}
23333impl Default for ODOMETRY_DATA {
23334 fn default() -> Self {
23335 Self::DEFAULT.clone()
23336 }
23337}
23338impl MessageData for ODOMETRY_DATA {
23339 type Message = MavMessage;
23340 const ID: u32 = 331u32;
23341 const NAME: &'static str = "ODOMETRY";
23342 const EXTRA_CRC: u8 = 91u8;
23343 const ENCODED_LEN: usize = 233usize;
23344 fn deser(
23345 _version: MavlinkVersion,
23346 __input: &[u8],
23347 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23348 let avail_len = __input.len();
23349 let mut payload_buf = [0; Self::ENCODED_LEN];
23350 let mut buf = if avail_len < Self::ENCODED_LEN {
23351 payload_buf[0..avail_len].copy_from_slice(__input);
23352 Bytes::new(&payload_buf)
23353 } else {
23354 Bytes::new(__input)
23355 };
23356 let mut __struct = Self::default();
23357 __struct.time_usec = buf.get_u64_le()?;
23358 __struct.x = buf.get_f32_le()?;
23359 __struct.y = buf.get_f32_le()?;
23360 __struct.z = buf.get_f32_le()?;
23361 for v in &mut __struct.q {
23362 let val = buf.get_f32_le()?;
23363 *v = val;
23364 }
23365 __struct.vx = buf.get_f32_le()?;
23366 __struct.vy = buf.get_f32_le()?;
23367 __struct.vz = buf.get_f32_le()?;
23368 __struct.rollspeed = buf.get_f32_le()?;
23369 __struct.pitchspeed = buf.get_f32_le()?;
23370 __struct.yawspeed = buf.get_f32_le()?;
23371 for v in &mut __struct.pose_covariance {
23372 let val = buf.get_f32_le()?;
23373 *v = val;
23374 }
23375 for v in &mut __struct.velocity_covariance {
23376 let val = buf.get_f32_le()?;
23377 *v = val;
23378 }
23379 let tmp = buf.get_u8()?;
23380 __struct.frame_id =
23381 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23382 enum_type: "MavFrame",
23383 value: tmp as u64,
23384 })?;
23385 let tmp = buf.get_u8()?;
23386 __struct.child_frame_id =
23387 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23388 enum_type: "MavFrame",
23389 value: tmp as u64,
23390 })?;
23391 __struct.reset_counter = buf.get_u8()?;
23392 let tmp = buf.get_u8()?;
23393 __struct.estimator_type =
23394 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23395 enum_type: "MavEstimatorType",
23396 value: tmp as u64,
23397 })?;
23398 __struct.quality = buf.get_i8()?;
23399 Ok(__struct)
23400 }
23401 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23402 let mut __tmp = BytesMut::new(bytes);
23403 #[allow(clippy::absurd_extreme_comparisons)]
23404 #[allow(unused_comparisons)]
23405 if __tmp.remaining() < Self::ENCODED_LEN {
23406 panic!(
23407 "buffer is too small (need {} bytes, but got {})",
23408 Self::ENCODED_LEN,
23409 __tmp.remaining(),
23410 )
23411 }
23412 __tmp.put_u64_le(self.time_usec);
23413 __tmp.put_f32_le(self.x);
23414 __tmp.put_f32_le(self.y);
23415 __tmp.put_f32_le(self.z);
23416 for val in &self.q {
23417 __tmp.put_f32_le(*val);
23418 }
23419 __tmp.put_f32_le(self.vx);
23420 __tmp.put_f32_le(self.vy);
23421 __tmp.put_f32_le(self.vz);
23422 __tmp.put_f32_le(self.rollspeed);
23423 __tmp.put_f32_le(self.pitchspeed);
23424 __tmp.put_f32_le(self.yawspeed);
23425 for val in &self.pose_covariance {
23426 __tmp.put_f32_le(*val);
23427 }
23428 for val in &self.velocity_covariance {
23429 __tmp.put_f32_le(*val);
23430 }
23431 __tmp.put_u8(self.frame_id as u8);
23432 __tmp.put_u8(self.child_frame_id as u8);
23433 if matches!(version, MavlinkVersion::V2) {
23434 __tmp.put_u8(self.reset_counter);
23435 __tmp.put_u8(self.estimator_type as u8);
23436 __tmp.put_i8(self.quality);
23437 let len = __tmp.len();
23438 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23439 } else {
23440 __tmp.len()
23441 }
23442 }
23443}
23444#[doc = "Hardware status sent by an onboard computer."]
23445#[doc = ""]
23446#[doc = "ID: 390"]
23447#[derive(Debug, Clone, PartialEq)]
23448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23450#[cfg_attr(feature = "ts", derive(TS))]
23451#[cfg_attr(feature = "ts", ts(export))]
23452pub struct ONBOARD_COMPUTER_STATUS_DATA {
23453 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23454 pub time_usec: u64,
23455 #[doc = "Time since system boot."]
23456 pub uptime: u32,
23457 #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
23458 pub ram_usage: u32,
23459 #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
23460 pub ram_total: u32,
23461 #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
23462 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23463 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23464 pub storage_type: [u32; 4],
23465 #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
23466 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23467 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23468 pub storage_usage: [u32; 4],
23469 #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
23470 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23471 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23472 pub storage_total: [u32; 4],
23473 #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
23474 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23475 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23476 pub link_type: [u32; 6],
23477 #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
23478 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23479 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23480 pub link_tx_rate: [u32; 6],
23481 #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
23482 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23483 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23484 pub link_rx_rate: [u32; 6],
23485 #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
23486 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23487 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23488 pub link_tx_max: [u32; 6],
23489 #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
23490 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23491 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23492 pub link_rx_max: [u32; 6],
23493 #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
23494 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23495 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23496 pub fan_speed: [i16; 4],
23497 #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
23498 pub mavtype: u8,
23499 #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
23500 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23501 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23502 pub cpu_cores: [u8; 8],
23503 #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
23504 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23505 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23506 pub cpu_combined: [u8; 10],
23507 #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
23508 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23509 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23510 pub gpu_cores: [u8; 4],
23511 #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
23512 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23513 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23514 pub gpu_combined: [u8; 10],
23515 #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
23516 pub temperature_board: i8,
23517 #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
23518 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23519 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23520 pub temperature_core: [i8; 8],
23521}
23522impl ONBOARD_COMPUTER_STATUS_DATA {
23523 pub const ENCODED_LEN: usize = 238usize;
23524 pub const DEFAULT: Self = Self {
23525 time_usec: 0_u64,
23526 uptime: 0_u32,
23527 ram_usage: 0_u32,
23528 ram_total: 0_u32,
23529 storage_type: [0_u32; 4usize],
23530 storage_usage: [0_u32; 4usize],
23531 storage_total: [0_u32; 4usize],
23532 link_type: [0_u32; 6usize],
23533 link_tx_rate: [0_u32; 6usize],
23534 link_rx_rate: [0_u32; 6usize],
23535 link_tx_max: [0_u32; 6usize],
23536 link_rx_max: [0_u32; 6usize],
23537 fan_speed: [0_i16; 4usize],
23538 mavtype: 0_u8,
23539 cpu_cores: [0_u8; 8usize],
23540 cpu_combined: [0_u8; 10usize],
23541 gpu_cores: [0_u8; 4usize],
23542 gpu_combined: [0_u8; 10usize],
23543 temperature_board: 0_i8,
23544 temperature_core: [0_i8; 8usize],
23545 };
23546 #[cfg(feature = "arbitrary")]
23547 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23548 use arbitrary::{Arbitrary, Unstructured};
23549 let mut buf = [0u8; 1024];
23550 rng.fill_bytes(&mut buf);
23551 let mut unstructured = Unstructured::new(&buf);
23552 Self::arbitrary(&mut unstructured).unwrap_or_default()
23553 }
23554}
23555impl Default for ONBOARD_COMPUTER_STATUS_DATA {
23556 fn default() -> Self {
23557 Self::DEFAULT.clone()
23558 }
23559}
23560impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
23561 type Message = MavMessage;
23562 const ID: u32 = 390u32;
23563 const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
23564 const EXTRA_CRC: u8 = 156u8;
23565 const ENCODED_LEN: usize = 238usize;
23566 fn deser(
23567 _version: MavlinkVersion,
23568 __input: &[u8],
23569 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23570 let avail_len = __input.len();
23571 let mut payload_buf = [0; Self::ENCODED_LEN];
23572 let mut buf = if avail_len < Self::ENCODED_LEN {
23573 payload_buf[0..avail_len].copy_from_slice(__input);
23574 Bytes::new(&payload_buf)
23575 } else {
23576 Bytes::new(__input)
23577 };
23578 let mut __struct = Self::default();
23579 __struct.time_usec = buf.get_u64_le()?;
23580 __struct.uptime = buf.get_u32_le()?;
23581 __struct.ram_usage = buf.get_u32_le()?;
23582 __struct.ram_total = buf.get_u32_le()?;
23583 for v in &mut __struct.storage_type {
23584 let val = buf.get_u32_le()?;
23585 *v = val;
23586 }
23587 for v in &mut __struct.storage_usage {
23588 let val = buf.get_u32_le()?;
23589 *v = val;
23590 }
23591 for v in &mut __struct.storage_total {
23592 let val = buf.get_u32_le()?;
23593 *v = val;
23594 }
23595 for v in &mut __struct.link_type {
23596 let val = buf.get_u32_le()?;
23597 *v = val;
23598 }
23599 for v in &mut __struct.link_tx_rate {
23600 let val = buf.get_u32_le()?;
23601 *v = val;
23602 }
23603 for v in &mut __struct.link_rx_rate {
23604 let val = buf.get_u32_le()?;
23605 *v = val;
23606 }
23607 for v in &mut __struct.link_tx_max {
23608 let val = buf.get_u32_le()?;
23609 *v = val;
23610 }
23611 for v in &mut __struct.link_rx_max {
23612 let val = buf.get_u32_le()?;
23613 *v = val;
23614 }
23615 for v in &mut __struct.fan_speed {
23616 let val = buf.get_i16_le()?;
23617 *v = val;
23618 }
23619 __struct.mavtype = buf.get_u8()?;
23620 for v in &mut __struct.cpu_cores {
23621 let val = buf.get_u8()?;
23622 *v = val;
23623 }
23624 for v in &mut __struct.cpu_combined {
23625 let val = buf.get_u8()?;
23626 *v = val;
23627 }
23628 for v in &mut __struct.gpu_cores {
23629 let val = buf.get_u8()?;
23630 *v = val;
23631 }
23632 for v in &mut __struct.gpu_combined {
23633 let val = buf.get_u8()?;
23634 *v = val;
23635 }
23636 __struct.temperature_board = buf.get_i8()?;
23637 for v in &mut __struct.temperature_core {
23638 let val = buf.get_i8()?;
23639 *v = val;
23640 }
23641 Ok(__struct)
23642 }
23643 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23644 let mut __tmp = BytesMut::new(bytes);
23645 #[allow(clippy::absurd_extreme_comparisons)]
23646 #[allow(unused_comparisons)]
23647 if __tmp.remaining() < Self::ENCODED_LEN {
23648 panic!(
23649 "buffer is too small (need {} bytes, but got {})",
23650 Self::ENCODED_LEN,
23651 __tmp.remaining(),
23652 )
23653 }
23654 __tmp.put_u64_le(self.time_usec);
23655 __tmp.put_u32_le(self.uptime);
23656 __tmp.put_u32_le(self.ram_usage);
23657 __tmp.put_u32_le(self.ram_total);
23658 for val in &self.storage_type {
23659 __tmp.put_u32_le(*val);
23660 }
23661 for val in &self.storage_usage {
23662 __tmp.put_u32_le(*val);
23663 }
23664 for val in &self.storage_total {
23665 __tmp.put_u32_le(*val);
23666 }
23667 for val in &self.link_type {
23668 __tmp.put_u32_le(*val);
23669 }
23670 for val in &self.link_tx_rate {
23671 __tmp.put_u32_le(*val);
23672 }
23673 for val in &self.link_rx_rate {
23674 __tmp.put_u32_le(*val);
23675 }
23676 for val in &self.link_tx_max {
23677 __tmp.put_u32_le(*val);
23678 }
23679 for val in &self.link_rx_max {
23680 __tmp.put_u32_le(*val);
23681 }
23682 for val in &self.fan_speed {
23683 __tmp.put_i16_le(*val);
23684 }
23685 __tmp.put_u8(self.mavtype);
23686 for val in &self.cpu_cores {
23687 __tmp.put_u8(*val);
23688 }
23689 for val in &self.cpu_combined {
23690 __tmp.put_u8(*val);
23691 }
23692 for val in &self.gpu_cores {
23693 __tmp.put_u8(*val);
23694 }
23695 for val in &self.gpu_combined {
23696 __tmp.put_u8(*val);
23697 }
23698 __tmp.put_i8(self.temperature_board);
23699 for val in &self.temperature_core {
23700 __tmp.put_i8(*val);
23701 }
23702 if matches!(version, MavlinkVersion::V2) {
23703 let len = __tmp.len();
23704 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23705 } else {
23706 __tmp.len()
23707 }
23708 }
23709}
23710#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
23711#[doc = ""]
23712#[doc = "ID: 12918"]
23713#[derive(Debug, Clone, PartialEq)]
23714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23716#[cfg_attr(feature = "ts", derive(TS))]
23717#[cfg_attr(feature = "ts", ts(export))]
23718pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
23719 #[doc = "Status level indicating if arming is allowed."]
23720 pub status: MavOdidArmStatus,
23721 #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
23722 #[cfg_attr(feature = "ts", ts(type = "string"))]
23723 pub error: CharArray<50>,
23724}
23725impl OPEN_DRONE_ID_ARM_STATUS_DATA {
23726 pub const ENCODED_LEN: usize = 51usize;
23727 pub const DEFAULT: Self = Self {
23728 status: MavOdidArmStatus::DEFAULT,
23729 error: CharArray::new([0_u8; 50usize]),
23730 };
23731 #[cfg(feature = "arbitrary")]
23732 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23733 use arbitrary::{Arbitrary, Unstructured};
23734 let mut buf = [0u8; 1024];
23735 rng.fill_bytes(&mut buf);
23736 let mut unstructured = Unstructured::new(&buf);
23737 Self::arbitrary(&mut unstructured).unwrap_or_default()
23738 }
23739}
23740impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
23741 fn default() -> Self {
23742 Self::DEFAULT.clone()
23743 }
23744}
23745impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
23746 type Message = MavMessage;
23747 const ID: u32 = 12918u32;
23748 const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
23749 const EXTRA_CRC: u8 = 139u8;
23750 const ENCODED_LEN: usize = 51usize;
23751 fn deser(
23752 _version: MavlinkVersion,
23753 __input: &[u8],
23754 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23755 let avail_len = __input.len();
23756 let mut payload_buf = [0; Self::ENCODED_LEN];
23757 let mut buf = if avail_len < Self::ENCODED_LEN {
23758 payload_buf[0..avail_len].copy_from_slice(__input);
23759 Bytes::new(&payload_buf)
23760 } else {
23761 Bytes::new(__input)
23762 };
23763 let mut __struct = Self::default();
23764 let tmp = buf.get_u8()?;
23765 __struct.status =
23766 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23767 enum_type: "MavOdidArmStatus",
23768 value: tmp as u64,
23769 })?;
23770 let mut tmp = [0_u8; 50usize];
23771 for v in &mut tmp {
23772 *v = buf.get_u8()?;
23773 }
23774 __struct.error = CharArray::new(tmp);
23775 Ok(__struct)
23776 }
23777 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23778 let mut __tmp = BytesMut::new(bytes);
23779 #[allow(clippy::absurd_extreme_comparisons)]
23780 #[allow(unused_comparisons)]
23781 if __tmp.remaining() < Self::ENCODED_LEN {
23782 panic!(
23783 "buffer is too small (need {} bytes, but got {})",
23784 Self::ENCODED_LEN,
23785 __tmp.remaining(),
23786 )
23787 }
23788 __tmp.put_u8(self.status as u8);
23789 for val in &self.error {
23790 __tmp.put_u8(*val);
23791 }
23792 if matches!(version, MavlinkVersion::V2) {
23793 let len = __tmp.len();
23794 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23795 } else {
23796 __tmp.len()
23797 }
23798 }
23799}
23800#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
23801#[doc = ""]
23802#[doc = "ID: 12902"]
23803#[derive(Debug, Clone, PartialEq)]
23804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23806#[cfg_attr(feature = "ts", derive(TS))]
23807#[cfg_attr(feature = "ts", ts(export))]
23808pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
23809 #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23810 pub timestamp: u32,
23811 #[doc = "System ID (0 for broadcast)."]
23812 pub target_system: u8,
23813 #[doc = "Component ID (0 for broadcast)."]
23814 pub target_component: u8,
23815 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23816 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23817 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23818 pub id_or_mac: [u8; 20],
23819 #[doc = "Indicates the type of authentication."]
23820 pub authentication_type: MavOdidAuthType,
23821 #[doc = "Allowed range is 0 - 15."]
23822 pub data_page: u8,
23823 #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
23824 pub last_page_index: u8,
23825 #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
23826 pub length: u8,
23827 #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
23828 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23829 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23830 pub authentication_data: [u8; 23],
23831}
23832impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
23833 pub const ENCODED_LEN: usize = 53usize;
23834 pub const DEFAULT: Self = Self {
23835 timestamp: 0_u32,
23836 target_system: 0_u8,
23837 target_component: 0_u8,
23838 id_or_mac: [0_u8; 20usize],
23839 authentication_type: MavOdidAuthType::DEFAULT,
23840 data_page: 0_u8,
23841 last_page_index: 0_u8,
23842 length: 0_u8,
23843 authentication_data: [0_u8; 23usize],
23844 };
23845 #[cfg(feature = "arbitrary")]
23846 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23847 use arbitrary::{Arbitrary, Unstructured};
23848 let mut buf = [0u8; 1024];
23849 rng.fill_bytes(&mut buf);
23850 let mut unstructured = Unstructured::new(&buf);
23851 Self::arbitrary(&mut unstructured).unwrap_or_default()
23852 }
23853}
23854impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
23855 fn default() -> Self {
23856 Self::DEFAULT.clone()
23857 }
23858}
23859impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
23860 type Message = MavMessage;
23861 const ID: u32 = 12902u32;
23862 const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
23863 const EXTRA_CRC: u8 = 140u8;
23864 const ENCODED_LEN: usize = 53usize;
23865 fn deser(
23866 _version: MavlinkVersion,
23867 __input: &[u8],
23868 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23869 let avail_len = __input.len();
23870 let mut payload_buf = [0; Self::ENCODED_LEN];
23871 let mut buf = if avail_len < Self::ENCODED_LEN {
23872 payload_buf[0..avail_len].copy_from_slice(__input);
23873 Bytes::new(&payload_buf)
23874 } else {
23875 Bytes::new(__input)
23876 };
23877 let mut __struct = Self::default();
23878 __struct.timestamp = buf.get_u32_le()?;
23879 __struct.target_system = buf.get_u8()?;
23880 __struct.target_component = buf.get_u8()?;
23881 for v in &mut __struct.id_or_mac {
23882 let val = buf.get_u8()?;
23883 *v = val;
23884 }
23885 let tmp = buf.get_u8()?;
23886 __struct.authentication_type =
23887 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23888 enum_type: "MavOdidAuthType",
23889 value: tmp as u64,
23890 })?;
23891 __struct.data_page = buf.get_u8()?;
23892 __struct.last_page_index = buf.get_u8()?;
23893 __struct.length = buf.get_u8()?;
23894 for v in &mut __struct.authentication_data {
23895 let val = buf.get_u8()?;
23896 *v = val;
23897 }
23898 Ok(__struct)
23899 }
23900 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23901 let mut __tmp = BytesMut::new(bytes);
23902 #[allow(clippy::absurd_extreme_comparisons)]
23903 #[allow(unused_comparisons)]
23904 if __tmp.remaining() < Self::ENCODED_LEN {
23905 panic!(
23906 "buffer is too small (need {} bytes, but got {})",
23907 Self::ENCODED_LEN,
23908 __tmp.remaining(),
23909 )
23910 }
23911 __tmp.put_u32_le(self.timestamp);
23912 __tmp.put_u8(self.target_system);
23913 __tmp.put_u8(self.target_component);
23914 for val in &self.id_or_mac {
23915 __tmp.put_u8(*val);
23916 }
23917 __tmp.put_u8(self.authentication_type as u8);
23918 __tmp.put_u8(self.data_page);
23919 __tmp.put_u8(self.last_page_index);
23920 __tmp.put_u8(self.length);
23921 for val in &self.authentication_data {
23922 __tmp.put_u8(*val);
23923 }
23924 if matches!(version, MavlinkVersion::V2) {
23925 let len = __tmp.len();
23926 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23927 } else {
23928 __tmp.len()
23929 }
23930 }
23931}
23932#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
23933#[doc = ""]
23934#[doc = "ID: 12900"]
23935#[derive(Debug, Clone, PartialEq)]
23936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23938#[cfg_attr(feature = "ts", derive(TS))]
23939#[cfg_attr(feature = "ts", ts(export))]
23940pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
23941 #[doc = "System ID (0 for broadcast)."]
23942 pub target_system: u8,
23943 #[doc = "Component ID (0 for broadcast)."]
23944 pub target_component: u8,
23945 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23946 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23947 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23948 pub id_or_mac: [u8; 20],
23949 #[doc = "Indicates the format for the uas_id field of this message."]
23950 pub id_type: MavOdidIdType,
23951 #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
23952 pub ua_type: MavOdidUaType,
23953 #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
23954 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23955 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23956 pub uas_id: [u8; 20],
23957}
23958impl OPEN_DRONE_ID_BASIC_ID_DATA {
23959 pub const ENCODED_LEN: usize = 44usize;
23960 pub const DEFAULT: Self = Self {
23961 target_system: 0_u8,
23962 target_component: 0_u8,
23963 id_or_mac: [0_u8; 20usize],
23964 id_type: MavOdidIdType::DEFAULT,
23965 ua_type: MavOdidUaType::DEFAULT,
23966 uas_id: [0_u8; 20usize],
23967 };
23968 #[cfg(feature = "arbitrary")]
23969 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23970 use arbitrary::{Arbitrary, Unstructured};
23971 let mut buf = [0u8; 1024];
23972 rng.fill_bytes(&mut buf);
23973 let mut unstructured = Unstructured::new(&buf);
23974 Self::arbitrary(&mut unstructured).unwrap_or_default()
23975 }
23976}
23977impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
23978 fn default() -> Self {
23979 Self::DEFAULT.clone()
23980 }
23981}
23982impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
23983 type Message = MavMessage;
23984 const ID: u32 = 12900u32;
23985 const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
23986 const EXTRA_CRC: u8 = 114u8;
23987 const ENCODED_LEN: usize = 44usize;
23988 fn deser(
23989 _version: MavlinkVersion,
23990 __input: &[u8],
23991 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23992 let avail_len = __input.len();
23993 let mut payload_buf = [0; Self::ENCODED_LEN];
23994 let mut buf = if avail_len < Self::ENCODED_LEN {
23995 payload_buf[0..avail_len].copy_from_slice(__input);
23996 Bytes::new(&payload_buf)
23997 } else {
23998 Bytes::new(__input)
23999 };
24000 let mut __struct = Self::default();
24001 __struct.target_system = buf.get_u8()?;
24002 __struct.target_component = buf.get_u8()?;
24003 for v in &mut __struct.id_or_mac {
24004 let val = buf.get_u8()?;
24005 *v = val;
24006 }
24007 let tmp = buf.get_u8()?;
24008 __struct.id_type =
24009 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24010 enum_type: "MavOdidIdType",
24011 value: tmp as u64,
24012 })?;
24013 let tmp = buf.get_u8()?;
24014 __struct.ua_type =
24015 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24016 enum_type: "MavOdidUaType",
24017 value: tmp as u64,
24018 })?;
24019 for v in &mut __struct.uas_id {
24020 let val = buf.get_u8()?;
24021 *v = val;
24022 }
24023 Ok(__struct)
24024 }
24025 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24026 let mut __tmp = BytesMut::new(bytes);
24027 #[allow(clippy::absurd_extreme_comparisons)]
24028 #[allow(unused_comparisons)]
24029 if __tmp.remaining() < Self::ENCODED_LEN {
24030 panic!(
24031 "buffer is too small (need {} bytes, but got {})",
24032 Self::ENCODED_LEN,
24033 __tmp.remaining(),
24034 )
24035 }
24036 __tmp.put_u8(self.target_system);
24037 __tmp.put_u8(self.target_component);
24038 for val in &self.id_or_mac {
24039 __tmp.put_u8(*val);
24040 }
24041 __tmp.put_u8(self.id_type as u8);
24042 __tmp.put_u8(self.ua_type as u8);
24043 for val in &self.uas_id {
24044 __tmp.put_u8(*val);
24045 }
24046 if matches!(version, MavlinkVersion::V2) {
24047 let len = __tmp.len();
24048 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24049 } else {
24050 __tmp.len()
24051 }
24052 }
24053}
24054#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
24055#[doc = ""]
24056#[doc = "ID: 12901"]
24057#[derive(Debug, Clone, PartialEq)]
24058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24060#[cfg_attr(feature = "ts", derive(TS))]
24061#[cfg_attr(feature = "ts", ts(export))]
24062pub struct OPEN_DRONE_ID_LOCATION_DATA {
24063 #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
24064 pub latitude: i32,
24065 #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
24066 pub longitude: i32,
24067 #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
24068 pub altitude_barometric: f32,
24069 #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
24070 pub altitude_geodetic: f32,
24071 #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
24072 pub height: f32,
24073 #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
24074 pub timestamp: f32,
24075 #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
24076 pub direction: u16,
24077 #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
24078 pub speed_horizontal: u16,
24079 #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
24080 pub speed_vertical: i16,
24081 #[doc = "System ID (0 for broadcast)."]
24082 pub target_system: u8,
24083 #[doc = "Component ID (0 for broadcast)."]
24084 pub target_component: u8,
24085 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24086 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24087 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24088 pub id_or_mac: [u8; 20],
24089 #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
24090 pub status: MavOdidStatus,
24091 #[doc = "Indicates the reference point for the height field."]
24092 pub height_reference: MavOdidHeightRef,
24093 #[doc = "The accuracy of the horizontal position."]
24094 pub horizontal_accuracy: MavOdidHorAcc,
24095 #[doc = "The accuracy of the vertical position."]
24096 pub vertical_accuracy: MavOdidVerAcc,
24097 #[doc = "The accuracy of the barometric altitude."]
24098 pub barometer_accuracy: MavOdidVerAcc,
24099 #[doc = "The accuracy of the horizontal and vertical speed."]
24100 pub speed_accuracy: MavOdidSpeedAcc,
24101 #[doc = "The accuracy of the timestamps."]
24102 pub timestamp_accuracy: MavOdidTimeAcc,
24103}
24104impl OPEN_DRONE_ID_LOCATION_DATA {
24105 pub const ENCODED_LEN: usize = 59usize;
24106 pub const DEFAULT: Self = Self {
24107 latitude: 0_i32,
24108 longitude: 0_i32,
24109 altitude_barometric: 0.0_f32,
24110 altitude_geodetic: 0.0_f32,
24111 height: 0.0_f32,
24112 timestamp: 0.0_f32,
24113 direction: 0_u16,
24114 speed_horizontal: 0_u16,
24115 speed_vertical: 0_i16,
24116 target_system: 0_u8,
24117 target_component: 0_u8,
24118 id_or_mac: [0_u8; 20usize],
24119 status: MavOdidStatus::DEFAULT,
24120 height_reference: MavOdidHeightRef::DEFAULT,
24121 horizontal_accuracy: MavOdidHorAcc::DEFAULT,
24122 vertical_accuracy: MavOdidVerAcc::DEFAULT,
24123 barometer_accuracy: MavOdidVerAcc::DEFAULT,
24124 speed_accuracy: MavOdidSpeedAcc::DEFAULT,
24125 timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
24126 };
24127 #[cfg(feature = "arbitrary")]
24128 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24129 use arbitrary::{Arbitrary, Unstructured};
24130 let mut buf = [0u8; 1024];
24131 rng.fill_bytes(&mut buf);
24132 let mut unstructured = Unstructured::new(&buf);
24133 Self::arbitrary(&mut unstructured).unwrap_or_default()
24134 }
24135}
24136impl Default for OPEN_DRONE_ID_LOCATION_DATA {
24137 fn default() -> Self {
24138 Self::DEFAULT.clone()
24139 }
24140}
24141impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
24142 type Message = MavMessage;
24143 const ID: u32 = 12901u32;
24144 const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
24145 const EXTRA_CRC: u8 = 254u8;
24146 const ENCODED_LEN: usize = 59usize;
24147 fn deser(
24148 _version: MavlinkVersion,
24149 __input: &[u8],
24150 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24151 let avail_len = __input.len();
24152 let mut payload_buf = [0; Self::ENCODED_LEN];
24153 let mut buf = if avail_len < Self::ENCODED_LEN {
24154 payload_buf[0..avail_len].copy_from_slice(__input);
24155 Bytes::new(&payload_buf)
24156 } else {
24157 Bytes::new(__input)
24158 };
24159 let mut __struct = Self::default();
24160 __struct.latitude = buf.get_i32_le()?;
24161 __struct.longitude = buf.get_i32_le()?;
24162 __struct.altitude_barometric = buf.get_f32_le()?;
24163 __struct.altitude_geodetic = buf.get_f32_le()?;
24164 __struct.height = buf.get_f32_le()?;
24165 __struct.timestamp = buf.get_f32_le()?;
24166 __struct.direction = buf.get_u16_le()?;
24167 __struct.speed_horizontal = buf.get_u16_le()?;
24168 __struct.speed_vertical = buf.get_i16_le()?;
24169 __struct.target_system = buf.get_u8()?;
24170 __struct.target_component = buf.get_u8()?;
24171 for v in &mut __struct.id_or_mac {
24172 let val = buf.get_u8()?;
24173 *v = val;
24174 }
24175 let tmp = buf.get_u8()?;
24176 __struct.status =
24177 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24178 enum_type: "MavOdidStatus",
24179 value: tmp as u64,
24180 })?;
24181 let tmp = buf.get_u8()?;
24182 __struct.height_reference =
24183 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24184 enum_type: "MavOdidHeightRef",
24185 value: tmp as u64,
24186 })?;
24187 let tmp = buf.get_u8()?;
24188 __struct.horizontal_accuracy =
24189 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24190 enum_type: "MavOdidHorAcc",
24191 value: tmp as u64,
24192 })?;
24193 let tmp = buf.get_u8()?;
24194 __struct.vertical_accuracy =
24195 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24196 enum_type: "MavOdidVerAcc",
24197 value: tmp as u64,
24198 })?;
24199 let tmp = buf.get_u8()?;
24200 __struct.barometer_accuracy =
24201 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24202 enum_type: "MavOdidVerAcc",
24203 value: tmp as u64,
24204 })?;
24205 let tmp = buf.get_u8()?;
24206 __struct.speed_accuracy =
24207 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24208 enum_type: "MavOdidSpeedAcc",
24209 value: tmp as u64,
24210 })?;
24211 let tmp = buf.get_u8()?;
24212 __struct.timestamp_accuracy =
24213 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24214 enum_type: "MavOdidTimeAcc",
24215 value: tmp as u64,
24216 })?;
24217 Ok(__struct)
24218 }
24219 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24220 let mut __tmp = BytesMut::new(bytes);
24221 #[allow(clippy::absurd_extreme_comparisons)]
24222 #[allow(unused_comparisons)]
24223 if __tmp.remaining() < Self::ENCODED_LEN {
24224 panic!(
24225 "buffer is too small (need {} bytes, but got {})",
24226 Self::ENCODED_LEN,
24227 __tmp.remaining(),
24228 )
24229 }
24230 __tmp.put_i32_le(self.latitude);
24231 __tmp.put_i32_le(self.longitude);
24232 __tmp.put_f32_le(self.altitude_barometric);
24233 __tmp.put_f32_le(self.altitude_geodetic);
24234 __tmp.put_f32_le(self.height);
24235 __tmp.put_f32_le(self.timestamp);
24236 __tmp.put_u16_le(self.direction);
24237 __tmp.put_u16_le(self.speed_horizontal);
24238 __tmp.put_i16_le(self.speed_vertical);
24239 __tmp.put_u8(self.target_system);
24240 __tmp.put_u8(self.target_component);
24241 for val in &self.id_or_mac {
24242 __tmp.put_u8(*val);
24243 }
24244 __tmp.put_u8(self.status as u8);
24245 __tmp.put_u8(self.height_reference as u8);
24246 __tmp.put_u8(self.horizontal_accuracy as u8);
24247 __tmp.put_u8(self.vertical_accuracy as u8);
24248 __tmp.put_u8(self.barometer_accuracy as u8);
24249 __tmp.put_u8(self.speed_accuracy as u8);
24250 __tmp.put_u8(self.timestamp_accuracy as u8);
24251 if matches!(version, MavlinkVersion::V2) {
24252 let len = __tmp.len();
24253 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24254 } else {
24255 __tmp.len()
24256 }
24257 }
24258}
24259#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
24260#[doc = ""]
24261#[doc = "ID: 12915"]
24262#[derive(Debug, Clone, PartialEq)]
24263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24265#[cfg_attr(feature = "ts", derive(TS))]
24266#[cfg_attr(feature = "ts", ts(export))]
24267pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24268 #[doc = "System ID (0 for broadcast)."]
24269 pub target_system: u8,
24270 #[doc = "Component ID (0 for broadcast)."]
24271 pub target_component: u8,
24272 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24273 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24274 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24275 pub id_or_mac: [u8; 20],
24276 #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
24277 pub single_message_size: u8,
24278 #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
24279 pub msg_pack_size: u8,
24280 #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
24281 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24282 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24283 pub messages: [u8; 225],
24284}
24285impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24286 pub const ENCODED_LEN: usize = 249usize;
24287 pub const DEFAULT: Self = Self {
24288 target_system: 0_u8,
24289 target_component: 0_u8,
24290 id_or_mac: [0_u8; 20usize],
24291 single_message_size: 0_u8,
24292 msg_pack_size: 0_u8,
24293 messages: [0_u8; 225usize],
24294 };
24295 #[cfg(feature = "arbitrary")]
24296 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24297 use arbitrary::{Arbitrary, Unstructured};
24298 let mut buf = [0u8; 1024];
24299 rng.fill_bytes(&mut buf);
24300 let mut unstructured = Unstructured::new(&buf);
24301 Self::arbitrary(&mut unstructured).unwrap_or_default()
24302 }
24303}
24304impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24305 fn default() -> Self {
24306 Self::DEFAULT.clone()
24307 }
24308}
24309impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24310 type Message = MavMessage;
24311 const ID: u32 = 12915u32;
24312 const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
24313 const EXTRA_CRC: u8 = 94u8;
24314 const ENCODED_LEN: usize = 249usize;
24315 fn deser(
24316 _version: MavlinkVersion,
24317 __input: &[u8],
24318 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24319 let avail_len = __input.len();
24320 let mut payload_buf = [0; Self::ENCODED_LEN];
24321 let mut buf = if avail_len < Self::ENCODED_LEN {
24322 payload_buf[0..avail_len].copy_from_slice(__input);
24323 Bytes::new(&payload_buf)
24324 } else {
24325 Bytes::new(__input)
24326 };
24327 let mut __struct = Self::default();
24328 __struct.target_system = buf.get_u8()?;
24329 __struct.target_component = buf.get_u8()?;
24330 for v in &mut __struct.id_or_mac {
24331 let val = buf.get_u8()?;
24332 *v = val;
24333 }
24334 __struct.single_message_size = buf.get_u8()?;
24335 __struct.msg_pack_size = buf.get_u8()?;
24336 for v in &mut __struct.messages {
24337 let val = buf.get_u8()?;
24338 *v = val;
24339 }
24340 Ok(__struct)
24341 }
24342 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24343 let mut __tmp = BytesMut::new(bytes);
24344 #[allow(clippy::absurd_extreme_comparisons)]
24345 #[allow(unused_comparisons)]
24346 if __tmp.remaining() < Self::ENCODED_LEN {
24347 panic!(
24348 "buffer is too small (need {} bytes, but got {})",
24349 Self::ENCODED_LEN,
24350 __tmp.remaining(),
24351 )
24352 }
24353 __tmp.put_u8(self.target_system);
24354 __tmp.put_u8(self.target_component);
24355 for val in &self.id_or_mac {
24356 __tmp.put_u8(*val);
24357 }
24358 __tmp.put_u8(self.single_message_size);
24359 __tmp.put_u8(self.msg_pack_size);
24360 for val in &self.messages {
24361 __tmp.put_u8(*val);
24362 }
24363 if matches!(version, MavlinkVersion::V2) {
24364 let len = __tmp.len();
24365 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24366 } else {
24367 __tmp.len()
24368 }
24369 }
24370}
24371#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
24372#[doc = ""]
24373#[doc = "ID: 12905"]
24374#[derive(Debug, Clone, PartialEq)]
24375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24377#[cfg_attr(feature = "ts", derive(TS))]
24378#[cfg_attr(feature = "ts", ts(export))]
24379pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
24380 #[doc = "System ID (0 for broadcast)."]
24381 pub target_system: u8,
24382 #[doc = "Component ID (0 for broadcast)."]
24383 pub target_component: u8,
24384 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24385 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24386 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24387 pub id_or_mac: [u8; 20],
24388 #[doc = "Indicates the type of the operator_id field."]
24389 pub operator_id_type: MavOdidOperatorIdType,
24390 #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
24391 #[cfg_attr(feature = "ts", ts(type = "string"))]
24392 pub operator_id: CharArray<20>,
24393}
24394impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
24395 pub const ENCODED_LEN: usize = 43usize;
24396 pub const DEFAULT: Self = Self {
24397 target_system: 0_u8,
24398 target_component: 0_u8,
24399 id_or_mac: [0_u8; 20usize],
24400 operator_id_type: MavOdidOperatorIdType::DEFAULT,
24401 operator_id: CharArray::new([0_u8; 20usize]),
24402 };
24403 #[cfg(feature = "arbitrary")]
24404 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24405 use arbitrary::{Arbitrary, Unstructured};
24406 let mut buf = [0u8; 1024];
24407 rng.fill_bytes(&mut buf);
24408 let mut unstructured = Unstructured::new(&buf);
24409 Self::arbitrary(&mut unstructured).unwrap_or_default()
24410 }
24411}
24412impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
24413 fn default() -> Self {
24414 Self::DEFAULT.clone()
24415 }
24416}
24417impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
24418 type Message = MavMessage;
24419 const ID: u32 = 12905u32;
24420 const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
24421 const EXTRA_CRC: u8 = 49u8;
24422 const ENCODED_LEN: usize = 43usize;
24423 fn deser(
24424 _version: MavlinkVersion,
24425 __input: &[u8],
24426 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24427 let avail_len = __input.len();
24428 let mut payload_buf = [0; Self::ENCODED_LEN];
24429 let mut buf = if avail_len < Self::ENCODED_LEN {
24430 payload_buf[0..avail_len].copy_from_slice(__input);
24431 Bytes::new(&payload_buf)
24432 } else {
24433 Bytes::new(__input)
24434 };
24435 let mut __struct = Self::default();
24436 __struct.target_system = buf.get_u8()?;
24437 __struct.target_component = buf.get_u8()?;
24438 for v in &mut __struct.id_or_mac {
24439 let val = buf.get_u8()?;
24440 *v = val;
24441 }
24442 let tmp = buf.get_u8()?;
24443 __struct.operator_id_type =
24444 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24445 enum_type: "MavOdidOperatorIdType",
24446 value: tmp as u64,
24447 })?;
24448 let mut tmp = [0_u8; 20usize];
24449 for v in &mut tmp {
24450 *v = buf.get_u8()?;
24451 }
24452 __struct.operator_id = CharArray::new(tmp);
24453 Ok(__struct)
24454 }
24455 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24456 let mut __tmp = BytesMut::new(bytes);
24457 #[allow(clippy::absurd_extreme_comparisons)]
24458 #[allow(unused_comparisons)]
24459 if __tmp.remaining() < Self::ENCODED_LEN {
24460 panic!(
24461 "buffer is too small (need {} bytes, but got {})",
24462 Self::ENCODED_LEN,
24463 __tmp.remaining(),
24464 )
24465 }
24466 __tmp.put_u8(self.target_system);
24467 __tmp.put_u8(self.target_component);
24468 for val in &self.id_or_mac {
24469 __tmp.put_u8(*val);
24470 }
24471 __tmp.put_u8(self.operator_id_type as u8);
24472 for val in &self.operator_id {
24473 __tmp.put_u8(*val);
24474 }
24475 if matches!(version, MavlinkVersion::V2) {
24476 let len = __tmp.len();
24477 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24478 } else {
24479 __tmp.len()
24480 }
24481 }
24482}
24483#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
24484#[doc = ""]
24485#[doc = "ID: 12903"]
24486#[derive(Debug, Clone, PartialEq)]
24487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24489#[cfg_attr(feature = "ts", derive(TS))]
24490#[cfg_attr(feature = "ts", ts(export))]
24491pub struct OPEN_DRONE_ID_SELF_ID_DATA {
24492 #[doc = "System ID (0 for broadcast)."]
24493 pub target_system: u8,
24494 #[doc = "Component ID (0 for broadcast)."]
24495 pub target_component: u8,
24496 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24497 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24498 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24499 pub id_or_mac: [u8; 20],
24500 #[doc = "Indicates the type of the description field."]
24501 pub description_type: MavOdidDescType,
24502 #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
24503 #[cfg_attr(feature = "ts", ts(type = "string"))]
24504 pub description: CharArray<23>,
24505}
24506impl OPEN_DRONE_ID_SELF_ID_DATA {
24507 pub const ENCODED_LEN: usize = 46usize;
24508 pub const DEFAULT: Self = Self {
24509 target_system: 0_u8,
24510 target_component: 0_u8,
24511 id_or_mac: [0_u8; 20usize],
24512 description_type: MavOdidDescType::DEFAULT,
24513 description: CharArray::new([0_u8; 23usize]),
24514 };
24515 #[cfg(feature = "arbitrary")]
24516 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24517 use arbitrary::{Arbitrary, Unstructured};
24518 let mut buf = [0u8; 1024];
24519 rng.fill_bytes(&mut buf);
24520 let mut unstructured = Unstructured::new(&buf);
24521 Self::arbitrary(&mut unstructured).unwrap_or_default()
24522 }
24523}
24524impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
24525 fn default() -> Self {
24526 Self::DEFAULT.clone()
24527 }
24528}
24529impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
24530 type Message = MavMessage;
24531 const ID: u32 = 12903u32;
24532 const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
24533 const EXTRA_CRC: u8 = 249u8;
24534 const ENCODED_LEN: usize = 46usize;
24535 fn deser(
24536 _version: MavlinkVersion,
24537 __input: &[u8],
24538 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24539 let avail_len = __input.len();
24540 let mut payload_buf = [0; Self::ENCODED_LEN];
24541 let mut buf = if avail_len < Self::ENCODED_LEN {
24542 payload_buf[0..avail_len].copy_from_slice(__input);
24543 Bytes::new(&payload_buf)
24544 } else {
24545 Bytes::new(__input)
24546 };
24547 let mut __struct = Self::default();
24548 __struct.target_system = buf.get_u8()?;
24549 __struct.target_component = buf.get_u8()?;
24550 for v in &mut __struct.id_or_mac {
24551 let val = buf.get_u8()?;
24552 *v = val;
24553 }
24554 let tmp = buf.get_u8()?;
24555 __struct.description_type =
24556 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24557 enum_type: "MavOdidDescType",
24558 value: tmp as u64,
24559 })?;
24560 let mut tmp = [0_u8; 23usize];
24561 for v in &mut tmp {
24562 *v = buf.get_u8()?;
24563 }
24564 __struct.description = CharArray::new(tmp);
24565 Ok(__struct)
24566 }
24567 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24568 let mut __tmp = BytesMut::new(bytes);
24569 #[allow(clippy::absurd_extreme_comparisons)]
24570 #[allow(unused_comparisons)]
24571 if __tmp.remaining() < Self::ENCODED_LEN {
24572 panic!(
24573 "buffer is too small (need {} bytes, but got {})",
24574 Self::ENCODED_LEN,
24575 __tmp.remaining(),
24576 )
24577 }
24578 __tmp.put_u8(self.target_system);
24579 __tmp.put_u8(self.target_component);
24580 for val in &self.id_or_mac {
24581 __tmp.put_u8(*val);
24582 }
24583 __tmp.put_u8(self.description_type as u8);
24584 for val in &self.description {
24585 __tmp.put_u8(*val);
24586 }
24587 if matches!(version, MavlinkVersion::V2) {
24588 let len = __tmp.len();
24589 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24590 } else {
24591 __tmp.len()
24592 }
24593 }
24594}
24595#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
24596#[doc = ""]
24597#[doc = "ID: 12904"]
24598#[derive(Debug, Clone, PartialEq)]
24599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24601#[cfg_attr(feature = "ts", derive(TS))]
24602#[cfg_attr(feature = "ts", ts(export))]
24603pub struct OPEN_DRONE_ID_SYSTEM_DATA {
24604 #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
24605 pub operator_latitude: i32,
24606 #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
24607 pub operator_longitude: i32,
24608 #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
24609 pub area_ceiling: f32,
24610 #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
24611 pub area_floor: f32,
24612 #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
24613 pub operator_altitude_geo: f32,
24614 #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
24615 pub timestamp: u32,
24616 #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
24617 pub area_count: u16,
24618 #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
24619 pub area_radius: u16,
24620 #[doc = "System ID (0 for broadcast)."]
24621 pub target_system: u8,
24622 #[doc = "Component ID (0 for broadcast)."]
24623 pub target_component: u8,
24624 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24625 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24626 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24627 pub id_or_mac: [u8; 20],
24628 #[doc = "Specifies the operator location type."]
24629 pub operator_location_type: MavOdidOperatorLocationType,
24630 #[doc = "Specifies the classification type of the UA."]
24631 pub classification_type: MavOdidClassificationType,
24632 #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
24633 pub category_eu: MavOdidCategoryEu,
24634 #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
24635 pub class_eu: MavOdidClassEu,
24636}
24637impl OPEN_DRONE_ID_SYSTEM_DATA {
24638 pub const ENCODED_LEN: usize = 54usize;
24639 pub const DEFAULT: Self = Self {
24640 operator_latitude: 0_i32,
24641 operator_longitude: 0_i32,
24642 area_ceiling: 0.0_f32,
24643 area_floor: 0.0_f32,
24644 operator_altitude_geo: 0.0_f32,
24645 timestamp: 0_u32,
24646 area_count: 0_u16,
24647 area_radius: 0_u16,
24648 target_system: 0_u8,
24649 target_component: 0_u8,
24650 id_or_mac: [0_u8; 20usize],
24651 operator_location_type: MavOdidOperatorLocationType::DEFAULT,
24652 classification_type: MavOdidClassificationType::DEFAULT,
24653 category_eu: MavOdidCategoryEu::DEFAULT,
24654 class_eu: MavOdidClassEu::DEFAULT,
24655 };
24656 #[cfg(feature = "arbitrary")]
24657 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24658 use arbitrary::{Arbitrary, Unstructured};
24659 let mut buf = [0u8; 1024];
24660 rng.fill_bytes(&mut buf);
24661 let mut unstructured = Unstructured::new(&buf);
24662 Self::arbitrary(&mut unstructured).unwrap_or_default()
24663 }
24664}
24665impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
24666 fn default() -> Self {
24667 Self::DEFAULT.clone()
24668 }
24669}
24670impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
24671 type Message = MavMessage;
24672 const ID: u32 = 12904u32;
24673 const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
24674 const EXTRA_CRC: u8 = 77u8;
24675 const ENCODED_LEN: usize = 54usize;
24676 fn deser(
24677 _version: MavlinkVersion,
24678 __input: &[u8],
24679 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24680 let avail_len = __input.len();
24681 let mut payload_buf = [0; Self::ENCODED_LEN];
24682 let mut buf = if avail_len < Self::ENCODED_LEN {
24683 payload_buf[0..avail_len].copy_from_slice(__input);
24684 Bytes::new(&payload_buf)
24685 } else {
24686 Bytes::new(__input)
24687 };
24688 let mut __struct = Self::default();
24689 __struct.operator_latitude = buf.get_i32_le()?;
24690 __struct.operator_longitude = buf.get_i32_le()?;
24691 __struct.area_ceiling = buf.get_f32_le()?;
24692 __struct.area_floor = buf.get_f32_le()?;
24693 __struct.operator_altitude_geo = buf.get_f32_le()?;
24694 __struct.timestamp = buf.get_u32_le()?;
24695 __struct.area_count = buf.get_u16_le()?;
24696 __struct.area_radius = buf.get_u16_le()?;
24697 __struct.target_system = buf.get_u8()?;
24698 __struct.target_component = buf.get_u8()?;
24699 for v in &mut __struct.id_or_mac {
24700 let val = buf.get_u8()?;
24701 *v = val;
24702 }
24703 let tmp = buf.get_u8()?;
24704 __struct.operator_location_type =
24705 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24706 enum_type: "MavOdidOperatorLocationType",
24707 value: tmp as u64,
24708 })?;
24709 let tmp = buf.get_u8()?;
24710 __struct.classification_type =
24711 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24712 enum_type: "MavOdidClassificationType",
24713 value: tmp as u64,
24714 })?;
24715 let tmp = buf.get_u8()?;
24716 __struct.category_eu =
24717 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24718 enum_type: "MavOdidCategoryEu",
24719 value: tmp as u64,
24720 })?;
24721 let tmp = buf.get_u8()?;
24722 __struct.class_eu =
24723 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24724 enum_type: "MavOdidClassEu",
24725 value: tmp as u64,
24726 })?;
24727 Ok(__struct)
24728 }
24729 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24730 let mut __tmp = BytesMut::new(bytes);
24731 #[allow(clippy::absurd_extreme_comparisons)]
24732 #[allow(unused_comparisons)]
24733 if __tmp.remaining() < Self::ENCODED_LEN {
24734 panic!(
24735 "buffer is too small (need {} bytes, but got {})",
24736 Self::ENCODED_LEN,
24737 __tmp.remaining(),
24738 )
24739 }
24740 __tmp.put_i32_le(self.operator_latitude);
24741 __tmp.put_i32_le(self.operator_longitude);
24742 __tmp.put_f32_le(self.area_ceiling);
24743 __tmp.put_f32_le(self.area_floor);
24744 __tmp.put_f32_le(self.operator_altitude_geo);
24745 __tmp.put_u32_le(self.timestamp);
24746 __tmp.put_u16_le(self.area_count);
24747 __tmp.put_u16_le(self.area_radius);
24748 __tmp.put_u8(self.target_system);
24749 __tmp.put_u8(self.target_component);
24750 for val in &self.id_or_mac {
24751 __tmp.put_u8(*val);
24752 }
24753 __tmp.put_u8(self.operator_location_type as u8);
24754 __tmp.put_u8(self.classification_type as u8);
24755 __tmp.put_u8(self.category_eu as u8);
24756 __tmp.put_u8(self.class_eu as u8);
24757 if matches!(version, MavlinkVersion::V2) {
24758 let len = __tmp.len();
24759 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24760 } else {
24761 __tmp.len()
24762 }
24763 }
24764}
24765#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
24766#[doc = ""]
24767#[doc = "ID: 12919"]
24768#[derive(Debug, Clone, PartialEq)]
24769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24771#[cfg_attr(feature = "ts", derive(TS))]
24772#[cfg_attr(feature = "ts", ts(export))]
24773pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24774 #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
24775 pub operator_latitude: i32,
24776 #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
24777 pub operator_longitude: i32,
24778 #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
24779 pub operator_altitude_geo: f32,
24780 #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
24781 pub timestamp: u32,
24782 #[doc = "System ID (0 for broadcast)."]
24783 pub target_system: u8,
24784 #[doc = "Component ID (0 for broadcast)."]
24785 pub target_component: u8,
24786}
24787impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24788 pub const ENCODED_LEN: usize = 18usize;
24789 pub const DEFAULT: Self = Self {
24790 operator_latitude: 0_i32,
24791 operator_longitude: 0_i32,
24792 operator_altitude_geo: 0.0_f32,
24793 timestamp: 0_u32,
24794 target_system: 0_u8,
24795 target_component: 0_u8,
24796 };
24797 #[cfg(feature = "arbitrary")]
24798 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24799 use arbitrary::{Arbitrary, Unstructured};
24800 let mut buf = [0u8; 1024];
24801 rng.fill_bytes(&mut buf);
24802 let mut unstructured = Unstructured::new(&buf);
24803 Self::arbitrary(&mut unstructured).unwrap_or_default()
24804 }
24805}
24806impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24807 fn default() -> Self {
24808 Self::DEFAULT.clone()
24809 }
24810}
24811impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24812 type Message = MavMessage;
24813 const ID: u32 = 12919u32;
24814 const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
24815 const EXTRA_CRC: u8 = 7u8;
24816 const ENCODED_LEN: usize = 18usize;
24817 fn deser(
24818 _version: MavlinkVersion,
24819 __input: &[u8],
24820 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24821 let avail_len = __input.len();
24822 let mut payload_buf = [0; Self::ENCODED_LEN];
24823 let mut buf = if avail_len < Self::ENCODED_LEN {
24824 payload_buf[0..avail_len].copy_from_slice(__input);
24825 Bytes::new(&payload_buf)
24826 } else {
24827 Bytes::new(__input)
24828 };
24829 let mut __struct = Self::default();
24830 __struct.operator_latitude = buf.get_i32_le()?;
24831 __struct.operator_longitude = buf.get_i32_le()?;
24832 __struct.operator_altitude_geo = buf.get_f32_le()?;
24833 __struct.timestamp = buf.get_u32_le()?;
24834 __struct.target_system = buf.get_u8()?;
24835 __struct.target_component = buf.get_u8()?;
24836 Ok(__struct)
24837 }
24838 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24839 let mut __tmp = BytesMut::new(bytes);
24840 #[allow(clippy::absurd_extreme_comparisons)]
24841 #[allow(unused_comparisons)]
24842 if __tmp.remaining() < Self::ENCODED_LEN {
24843 panic!(
24844 "buffer is too small (need {} bytes, but got {})",
24845 Self::ENCODED_LEN,
24846 __tmp.remaining(),
24847 )
24848 }
24849 __tmp.put_i32_le(self.operator_latitude);
24850 __tmp.put_i32_le(self.operator_longitude);
24851 __tmp.put_f32_le(self.operator_altitude_geo);
24852 __tmp.put_u32_le(self.timestamp);
24853 __tmp.put_u8(self.target_system);
24854 __tmp.put_u8(self.target_component);
24855 if matches!(version, MavlinkVersion::V2) {
24856 let len = __tmp.len();
24857 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24858 } else {
24859 __tmp.len()
24860 }
24861 }
24862}
24863#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
24864#[doc = ""]
24865#[doc = "ID: 100"]
24866#[derive(Debug, Clone, PartialEq)]
24867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24869#[cfg_attr(feature = "ts", derive(TS))]
24870#[cfg_attr(feature = "ts", ts(export))]
24871pub struct OPTICAL_FLOW_DATA {
24872 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24873 pub time_usec: u64,
24874 #[doc = "Flow in x-sensor direction, angular-speed compensated"]
24875 pub flow_comp_m_x: f32,
24876 #[doc = "Flow in y-sensor direction, angular-speed compensated"]
24877 pub flow_comp_m_y: f32,
24878 #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
24879 pub ground_distance: f32,
24880 #[doc = "Flow in x-sensor direction"]
24881 pub flow_x: i16,
24882 #[doc = "Flow in y-sensor direction"]
24883 pub flow_y: i16,
24884 #[doc = "Sensor ID"]
24885 pub sensor_id: u8,
24886 #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
24887 pub quality: u8,
24888 #[doc = "Flow rate about X axis"]
24889 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24890 pub flow_rate_x: f32,
24891 #[doc = "Flow rate about Y axis"]
24892 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24893 pub flow_rate_y: f32,
24894}
24895impl OPTICAL_FLOW_DATA {
24896 pub const ENCODED_LEN: usize = 34usize;
24897 pub const DEFAULT: Self = Self {
24898 time_usec: 0_u64,
24899 flow_comp_m_x: 0.0_f32,
24900 flow_comp_m_y: 0.0_f32,
24901 ground_distance: 0.0_f32,
24902 flow_x: 0_i16,
24903 flow_y: 0_i16,
24904 sensor_id: 0_u8,
24905 quality: 0_u8,
24906 flow_rate_x: 0.0_f32,
24907 flow_rate_y: 0.0_f32,
24908 };
24909 #[cfg(feature = "arbitrary")]
24910 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24911 use arbitrary::{Arbitrary, Unstructured};
24912 let mut buf = [0u8; 1024];
24913 rng.fill_bytes(&mut buf);
24914 let mut unstructured = Unstructured::new(&buf);
24915 Self::arbitrary(&mut unstructured).unwrap_or_default()
24916 }
24917}
24918impl Default for OPTICAL_FLOW_DATA {
24919 fn default() -> Self {
24920 Self::DEFAULT.clone()
24921 }
24922}
24923impl MessageData for OPTICAL_FLOW_DATA {
24924 type Message = MavMessage;
24925 const ID: u32 = 100u32;
24926 const NAME: &'static str = "OPTICAL_FLOW";
24927 const EXTRA_CRC: u8 = 175u8;
24928 const ENCODED_LEN: usize = 34usize;
24929 fn deser(
24930 _version: MavlinkVersion,
24931 __input: &[u8],
24932 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24933 let avail_len = __input.len();
24934 let mut payload_buf = [0; Self::ENCODED_LEN];
24935 let mut buf = if avail_len < Self::ENCODED_LEN {
24936 payload_buf[0..avail_len].copy_from_slice(__input);
24937 Bytes::new(&payload_buf)
24938 } else {
24939 Bytes::new(__input)
24940 };
24941 let mut __struct = Self::default();
24942 __struct.time_usec = buf.get_u64_le()?;
24943 __struct.flow_comp_m_x = buf.get_f32_le()?;
24944 __struct.flow_comp_m_y = buf.get_f32_le()?;
24945 __struct.ground_distance = buf.get_f32_le()?;
24946 __struct.flow_x = buf.get_i16_le()?;
24947 __struct.flow_y = buf.get_i16_le()?;
24948 __struct.sensor_id = buf.get_u8()?;
24949 __struct.quality = buf.get_u8()?;
24950 __struct.flow_rate_x = buf.get_f32_le()?;
24951 __struct.flow_rate_y = buf.get_f32_le()?;
24952 Ok(__struct)
24953 }
24954 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24955 let mut __tmp = BytesMut::new(bytes);
24956 #[allow(clippy::absurd_extreme_comparisons)]
24957 #[allow(unused_comparisons)]
24958 if __tmp.remaining() < Self::ENCODED_LEN {
24959 panic!(
24960 "buffer is too small (need {} bytes, but got {})",
24961 Self::ENCODED_LEN,
24962 __tmp.remaining(),
24963 )
24964 }
24965 __tmp.put_u64_le(self.time_usec);
24966 __tmp.put_f32_le(self.flow_comp_m_x);
24967 __tmp.put_f32_le(self.flow_comp_m_y);
24968 __tmp.put_f32_le(self.ground_distance);
24969 __tmp.put_i16_le(self.flow_x);
24970 __tmp.put_i16_le(self.flow_y);
24971 __tmp.put_u8(self.sensor_id);
24972 __tmp.put_u8(self.quality);
24973 if matches!(version, MavlinkVersion::V2) {
24974 __tmp.put_f32_le(self.flow_rate_x);
24975 __tmp.put_f32_le(self.flow_rate_y);
24976 let len = __tmp.len();
24977 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24978 } else {
24979 __tmp.len()
24980 }
24981 }
24982}
24983#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
24984#[doc = ""]
24985#[doc = "ID: 106"]
24986#[derive(Debug, Clone, PartialEq)]
24987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24989#[cfg_attr(feature = "ts", derive(TS))]
24990#[cfg_attr(feature = "ts", ts(export))]
24991pub struct OPTICAL_FLOW_RAD_DATA {
24992 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24993 pub time_usec: u64,
24994 #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
24995 pub integration_time_us: u32,
24996 #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
24997 pub integrated_x: f32,
24998 #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
24999 pub integrated_y: f32,
25000 #[doc = "RH rotation around X axis"]
25001 pub integrated_xgyro: f32,
25002 #[doc = "RH rotation around Y axis"]
25003 pub integrated_ygyro: f32,
25004 #[doc = "RH rotation around Z axis"]
25005 pub integrated_zgyro: f32,
25006 #[doc = "Time since the distance was sampled."]
25007 pub time_delta_distance_us: u32,
25008 #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
25009 pub distance: f32,
25010 #[doc = "Temperature"]
25011 pub temperature: i16,
25012 #[doc = "Sensor ID"]
25013 pub sensor_id: u8,
25014 #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
25015 pub quality: u8,
25016}
25017impl OPTICAL_FLOW_RAD_DATA {
25018 pub const ENCODED_LEN: usize = 44usize;
25019 pub const DEFAULT: Self = Self {
25020 time_usec: 0_u64,
25021 integration_time_us: 0_u32,
25022 integrated_x: 0.0_f32,
25023 integrated_y: 0.0_f32,
25024 integrated_xgyro: 0.0_f32,
25025 integrated_ygyro: 0.0_f32,
25026 integrated_zgyro: 0.0_f32,
25027 time_delta_distance_us: 0_u32,
25028 distance: 0.0_f32,
25029 temperature: 0_i16,
25030 sensor_id: 0_u8,
25031 quality: 0_u8,
25032 };
25033 #[cfg(feature = "arbitrary")]
25034 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25035 use arbitrary::{Arbitrary, Unstructured};
25036 let mut buf = [0u8; 1024];
25037 rng.fill_bytes(&mut buf);
25038 let mut unstructured = Unstructured::new(&buf);
25039 Self::arbitrary(&mut unstructured).unwrap_or_default()
25040 }
25041}
25042impl Default for OPTICAL_FLOW_RAD_DATA {
25043 fn default() -> Self {
25044 Self::DEFAULT.clone()
25045 }
25046}
25047impl MessageData for OPTICAL_FLOW_RAD_DATA {
25048 type Message = MavMessage;
25049 const ID: u32 = 106u32;
25050 const NAME: &'static str = "OPTICAL_FLOW_RAD";
25051 const EXTRA_CRC: u8 = 138u8;
25052 const ENCODED_LEN: usize = 44usize;
25053 fn deser(
25054 _version: MavlinkVersion,
25055 __input: &[u8],
25056 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25057 let avail_len = __input.len();
25058 let mut payload_buf = [0; Self::ENCODED_LEN];
25059 let mut buf = if avail_len < Self::ENCODED_LEN {
25060 payload_buf[0..avail_len].copy_from_slice(__input);
25061 Bytes::new(&payload_buf)
25062 } else {
25063 Bytes::new(__input)
25064 };
25065 let mut __struct = Self::default();
25066 __struct.time_usec = buf.get_u64_le()?;
25067 __struct.integration_time_us = buf.get_u32_le()?;
25068 __struct.integrated_x = buf.get_f32_le()?;
25069 __struct.integrated_y = buf.get_f32_le()?;
25070 __struct.integrated_xgyro = buf.get_f32_le()?;
25071 __struct.integrated_ygyro = buf.get_f32_le()?;
25072 __struct.integrated_zgyro = buf.get_f32_le()?;
25073 __struct.time_delta_distance_us = buf.get_u32_le()?;
25074 __struct.distance = buf.get_f32_le()?;
25075 __struct.temperature = buf.get_i16_le()?;
25076 __struct.sensor_id = buf.get_u8()?;
25077 __struct.quality = buf.get_u8()?;
25078 Ok(__struct)
25079 }
25080 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25081 let mut __tmp = BytesMut::new(bytes);
25082 #[allow(clippy::absurd_extreme_comparisons)]
25083 #[allow(unused_comparisons)]
25084 if __tmp.remaining() < Self::ENCODED_LEN {
25085 panic!(
25086 "buffer is too small (need {} bytes, but got {})",
25087 Self::ENCODED_LEN,
25088 __tmp.remaining(),
25089 )
25090 }
25091 __tmp.put_u64_le(self.time_usec);
25092 __tmp.put_u32_le(self.integration_time_us);
25093 __tmp.put_f32_le(self.integrated_x);
25094 __tmp.put_f32_le(self.integrated_y);
25095 __tmp.put_f32_le(self.integrated_xgyro);
25096 __tmp.put_f32_le(self.integrated_ygyro);
25097 __tmp.put_f32_le(self.integrated_zgyro);
25098 __tmp.put_u32_le(self.time_delta_distance_us);
25099 __tmp.put_f32_le(self.distance);
25100 __tmp.put_i16_le(self.temperature);
25101 __tmp.put_u8(self.sensor_id);
25102 __tmp.put_u8(self.quality);
25103 if matches!(version, MavlinkVersion::V2) {
25104 let len = __tmp.len();
25105 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25106 } else {
25107 __tmp.len()
25108 }
25109 }
25110}
25111#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
25112#[doc = ""]
25113#[doc = "ID: 360"]
25114#[derive(Debug, Clone, PartialEq)]
25115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25117#[cfg_attr(feature = "ts", derive(TS))]
25118#[cfg_attr(feature = "ts", ts(export))]
25119pub struct ORBIT_EXECUTION_STATUS_DATA {
25120 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25121 pub time_usec: u64,
25122 #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
25123 pub radius: f32,
25124 #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
25125 pub x: i32,
25126 #[doc = "Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
25127 pub y: i32,
25128 #[doc = "Altitude of center point. Coordinate system depends on frame field."]
25129 pub z: f32,
25130 #[doc = "The coordinate system of the fields: x, y, z."]
25131 pub frame: MavFrame,
25132}
25133impl ORBIT_EXECUTION_STATUS_DATA {
25134 pub const ENCODED_LEN: usize = 25usize;
25135 pub const DEFAULT: Self = Self {
25136 time_usec: 0_u64,
25137 radius: 0.0_f32,
25138 x: 0_i32,
25139 y: 0_i32,
25140 z: 0.0_f32,
25141 frame: MavFrame::DEFAULT,
25142 };
25143 #[cfg(feature = "arbitrary")]
25144 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25145 use arbitrary::{Arbitrary, Unstructured};
25146 let mut buf = [0u8; 1024];
25147 rng.fill_bytes(&mut buf);
25148 let mut unstructured = Unstructured::new(&buf);
25149 Self::arbitrary(&mut unstructured).unwrap_or_default()
25150 }
25151}
25152impl Default for ORBIT_EXECUTION_STATUS_DATA {
25153 fn default() -> Self {
25154 Self::DEFAULT.clone()
25155 }
25156}
25157impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
25158 type Message = MavMessage;
25159 const ID: u32 = 360u32;
25160 const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
25161 const EXTRA_CRC: u8 = 11u8;
25162 const ENCODED_LEN: usize = 25usize;
25163 fn deser(
25164 _version: MavlinkVersion,
25165 __input: &[u8],
25166 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25167 let avail_len = __input.len();
25168 let mut payload_buf = [0; Self::ENCODED_LEN];
25169 let mut buf = if avail_len < Self::ENCODED_LEN {
25170 payload_buf[0..avail_len].copy_from_slice(__input);
25171 Bytes::new(&payload_buf)
25172 } else {
25173 Bytes::new(__input)
25174 };
25175 let mut __struct = Self::default();
25176 __struct.time_usec = buf.get_u64_le()?;
25177 __struct.radius = buf.get_f32_le()?;
25178 __struct.x = buf.get_i32_le()?;
25179 __struct.y = buf.get_i32_le()?;
25180 __struct.z = buf.get_f32_le()?;
25181 let tmp = buf.get_u8()?;
25182 __struct.frame =
25183 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25184 enum_type: "MavFrame",
25185 value: tmp as u64,
25186 })?;
25187 Ok(__struct)
25188 }
25189 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25190 let mut __tmp = BytesMut::new(bytes);
25191 #[allow(clippy::absurd_extreme_comparisons)]
25192 #[allow(unused_comparisons)]
25193 if __tmp.remaining() < Self::ENCODED_LEN {
25194 panic!(
25195 "buffer is too small (need {} bytes, but got {})",
25196 Self::ENCODED_LEN,
25197 __tmp.remaining(),
25198 )
25199 }
25200 __tmp.put_u64_le(self.time_usec);
25201 __tmp.put_f32_le(self.radius);
25202 __tmp.put_i32_le(self.x);
25203 __tmp.put_i32_le(self.y);
25204 __tmp.put_f32_le(self.z);
25205 __tmp.put_u8(self.frame as u8);
25206 if matches!(version, MavlinkVersion::V2) {
25207 let len = __tmp.len();
25208 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25209 } else {
25210 __tmp.len()
25211 }
25212 }
25213}
25214#[doc = "Response from a PARAM_EXT_SET message."]
25215#[doc = ""]
25216#[doc = "ID: 324"]
25217#[derive(Debug, Clone, PartialEq)]
25218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25220#[cfg_attr(feature = "ts", derive(TS))]
25221#[cfg_attr(feature = "ts", ts(export))]
25222pub struct PARAM_EXT_ACK_DATA {
25223 #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25224 #[cfg_attr(feature = "ts", ts(type = "string"))]
25225 pub param_id: CharArray<16>,
25226 #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
25227 #[cfg_attr(feature = "ts", ts(type = "string"))]
25228 pub param_value: CharArray<128>,
25229 #[doc = "Parameter type."]
25230 pub param_type: MavParamExtType,
25231 #[doc = "Result code."]
25232 pub param_result: ParamAck,
25233}
25234impl PARAM_EXT_ACK_DATA {
25235 pub const ENCODED_LEN: usize = 146usize;
25236 pub const DEFAULT: Self = Self {
25237 param_id: CharArray::new([0_u8; 16usize]),
25238 param_value: CharArray::new([0_u8; 128usize]),
25239 param_type: MavParamExtType::DEFAULT,
25240 param_result: ParamAck::DEFAULT,
25241 };
25242 #[cfg(feature = "arbitrary")]
25243 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25244 use arbitrary::{Arbitrary, Unstructured};
25245 let mut buf = [0u8; 1024];
25246 rng.fill_bytes(&mut buf);
25247 let mut unstructured = Unstructured::new(&buf);
25248 Self::arbitrary(&mut unstructured).unwrap_or_default()
25249 }
25250}
25251impl Default for PARAM_EXT_ACK_DATA {
25252 fn default() -> Self {
25253 Self::DEFAULT.clone()
25254 }
25255}
25256impl MessageData for PARAM_EXT_ACK_DATA {
25257 type Message = MavMessage;
25258 const ID: u32 = 324u32;
25259 const NAME: &'static str = "PARAM_EXT_ACK";
25260 const EXTRA_CRC: u8 = 132u8;
25261 const ENCODED_LEN: usize = 146usize;
25262 fn deser(
25263 _version: MavlinkVersion,
25264 __input: &[u8],
25265 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25266 let avail_len = __input.len();
25267 let mut payload_buf = [0; Self::ENCODED_LEN];
25268 let mut buf = if avail_len < Self::ENCODED_LEN {
25269 payload_buf[0..avail_len].copy_from_slice(__input);
25270 Bytes::new(&payload_buf)
25271 } else {
25272 Bytes::new(__input)
25273 };
25274 let mut __struct = Self::default();
25275 let mut tmp = [0_u8; 16usize];
25276 for v in &mut tmp {
25277 *v = buf.get_u8()?;
25278 }
25279 __struct.param_id = CharArray::new(tmp);
25280 let mut tmp = [0_u8; 128usize];
25281 for v in &mut tmp {
25282 *v = buf.get_u8()?;
25283 }
25284 __struct.param_value = CharArray::new(tmp);
25285 let tmp = buf.get_u8()?;
25286 __struct.param_type =
25287 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25288 enum_type: "MavParamExtType",
25289 value: tmp as u64,
25290 })?;
25291 let tmp = buf.get_u8()?;
25292 __struct.param_result =
25293 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25294 enum_type: "ParamAck",
25295 value: tmp as u64,
25296 })?;
25297 Ok(__struct)
25298 }
25299 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25300 let mut __tmp = BytesMut::new(bytes);
25301 #[allow(clippy::absurd_extreme_comparisons)]
25302 #[allow(unused_comparisons)]
25303 if __tmp.remaining() < Self::ENCODED_LEN {
25304 panic!(
25305 "buffer is too small (need {} bytes, but got {})",
25306 Self::ENCODED_LEN,
25307 __tmp.remaining(),
25308 )
25309 }
25310 for val in &self.param_id {
25311 __tmp.put_u8(*val);
25312 }
25313 for val in &self.param_value {
25314 __tmp.put_u8(*val);
25315 }
25316 __tmp.put_u8(self.param_type as u8);
25317 __tmp.put_u8(self.param_result as u8);
25318 if matches!(version, MavlinkVersion::V2) {
25319 let len = __tmp.len();
25320 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25321 } else {
25322 __tmp.len()
25323 }
25324 }
25325}
25326#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
25327#[doc = ""]
25328#[doc = "ID: 321"]
25329#[derive(Debug, Clone, PartialEq)]
25330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25332#[cfg_attr(feature = "ts", derive(TS))]
25333#[cfg_attr(feature = "ts", ts(export))]
25334pub struct PARAM_EXT_REQUEST_LIST_DATA {
25335 #[doc = "System ID"]
25336 pub target_system: u8,
25337 #[doc = "Component ID"]
25338 pub target_component: u8,
25339}
25340impl PARAM_EXT_REQUEST_LIST_DATA {
25341 pub const ENCODED_LEN: usize = 2usize;
25342 pub const DEFAULT: Self = Self {
25343 target_system: 0_u8,
25344 target_component: 0_u8,
25345 };
25346 #[cfg(feature = "arbitrary")]
25347 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25348 use arbitrary::{Arbitrary, Unstructured};
25349 let mut buf = [0u8; 1024];
25350 rng.fill_bytes(&mut buf);
25351 let mut unstructured = Unstructured::new(&buf);
25352 Self::arbitrary(&mut unstructured).unwrap_or_default()
25353 }
25354}
25355impl Default for PARAM_EXT_REQUEST_LIST_DATA {
25356 fn default() -> Self {
25357 Self::DEFAULT.clone()
25358 }
25359}
25360impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
25361 type Message = MavMessage;
25362 const ID: u32 = 321u32;
25363 const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
25364 const EXTRA_CRC: u8 = 88u8;
25365 const ENCODED_LEN: usize = 2usize;
25366 fn deser(
25367 _version: MavlinkVersion,
25368 __input: &[u8],
25369 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25370 let avail_len = __input.len();
25371 let mut payload_buf = [0; Self::ENCODED_LEN];
25372 let mut buf = if avail_len < Self::ENCODED_LEN {
25373 payload_buf[0..avail_len].copy_from_slice(__input);
25374 Bytes::new(&payload_buf)
25375 } else {
25376 Bytes::new(__input)
25377 };
25378 let mut __struct = Self::default();
25379 __struct.target_system = buf.get_u8()?;
25380 __struct.target_component = buf.get_u8()?;
25381 Ok(__struct)
25382 }
25383 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25384 let mut __tmp = BytesMut::new(bytes);
25385 #[allow(clippy::absurd_extreme_comparisons)]
25386 #[allow(unused_comparisons)]
25387 if __tmp.remaining() < Self::ENCODED_LEN {
25388 panic!(
25389 "buffer is too small (need {} bytes, but got {})",
25390 Self::ENCODED_LEN,
25391 __tmp.remaining(),
25392 )
25393 }
25394 __tmp.put_u8(self.target_system);
25395 __tmp.put_u8(self.target_component);
25396 if matches!(version, MavlinkVersion::V2) {
25397 let len = __tmp.len();
25398 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25399 } else {
25400 __tmp.len()
25401 }
25402 }
25403}
25404#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
25405#[doc = ""]
25406#[doc = "ID: 320"]
25407#[derive(Debug, Clone, PartialEq)]
25408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25410#[cfg_attr(feature = "ts", derive(TS))]
25411#[cfg_attr(feature = "ts", ts(export))]
25412pub struct PARAM_EXT_REQUEST_READ_DATA {
25413 #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
25414 pub param_index: i16,
25415 #[doc = "System ID"]
25416 pub target_system: u8,
25417 #[doc = "Component ID"]
25418 pub target_component: u8,
25419 #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25420 #[cfg_attr(feature = "ts", ts(type = "string"))]
25421 pub param_id: CharArray<16>,
25422}
25423impl PARAM_EXT_REQUEST_READ_DATA {
25424 pub const ENCODED_LEN: usize = 20usize;
25425 pub const DEFAULT: Self = Self {
25426 param_index: 0_i16,
25427 target_system: 0_u8,
25428 target_component: 0_u8,
25429 param_id: CharArray::new([0_u8; 16usize]),
25430 };
25431 #[cfg(feature = "arbitrary")]
25432 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25433 use arbitrary::{Arbitrary, Unstructured};
25434 let mut buf = [0u8; 1024];
25435 rng.fill_bytes(&mut buf);
25436 let mut unstructured = Unstructured::new(&buf);
25437 Self::arbitrary(&mut unstructured).unwrap_or_default()
25438 }
25439}
25440impl Default for PARAM_EXT_REQUEST_READ_DATA {
25441 fn default() -> Self {
25442 Self::DEFAULT.clone()
25443 }
25444}
25445impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
25446 type Message = MavMessage;
25447 const ID: u32 = 320u32;
25448 const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
25449 const EXTRA_CRC: u8 = 243u8;
25450 const ENCODED_LEN: usize = 20usize;
25451 fn deser(
25452 _version: MavlinkVersion,
25453 __input: &[u8],
25454 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25455 let avail_len = __input.len();
25456 let mut payload_buf = [0; Self::ENCODED_LEN];
25457 let mut buf = if avail_len < Self::ENCODED_LEN {
25458 payload_buf[0..avail_len].copy_from_slice(__input);
25459 Bytes::new(&payload_buf)
25460 } else {
25461 Bytes::new(__input)
25462 };
25463 let mut __struct = Self::default();
25464 __struct.param_index = buf.get_i16_le()?;
25465 __struct.target_system = buf.get_u8()?;
25466 __struct.target_component = buf.get_u8()?;
25467 let mut tmp = [0_u8; 16usize];
25468 for v in &mut tmp {
25469 *v = buf.get_u8()?;
25470 }
25471 __struct.param_id = CharArray::new(tmp);
25472 Ok(__struct)
25473 }
25474 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25475 let mut __tmp = BytesMut::new(bytes);
25476 #[allow(clippy::absurd_extreme_comparisons)]
25477 #[allow(unused_comparisons)]
25478 if __tmp.remaining() < Self::ENCODED_LEN {
25479 panic!(
25480 "buffer is too small (need {} bytes, but got {})",
25481 Self::ENCODED_LEN,
25482 __tmp.remaining(),
25483 )
25484 }
25485 __tmp.put_i16_le(self.param_index);
25486 __tmp.put_u8(self.target_system);
25487 __tmp.put_u8(self.target_component);
25488 for val in &self.param_id {
25489 __tmp.put_u8(*val);
25490 }
25491 if matches!(version, MavlinkVersion::V2) {
25492 let len = __tmp.len();
25493 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25494 } else {
25495 __tmp.len()
25496 }
25497 }
25498}
25499#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
25500#[doc = ""]
25501#[doc = "ID: 323"]
25502#[derive(Debug, Clone, PartialEq)]
25503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25505#[cfg_attr(feature = "ts", derive(TS))]
25506#[cfg_attr(feature = "ts", ts(export))]
25507pub struct PARAM_EXT_SET_DATA {
25508 #[doc = "System ID"]
25509 pub target_system: u8,
25510 #[doc = "Component ID"]
25511 pub target_component: u8,
25512 #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25513 #[cfg_attr(feature = "ts", ts(type = "string"))]
25514 pub param_id: CharArray<16>,
25515 #[doc = "Parameter value"]
25516 #[cfg_attr(feature = "ts", ts(type = "string"))]
25517 pub param_value: CharArray<128>,
25518 #[doc = "Parameter type."]
25519 pub param_type: MavParamExtType,
25520}
25521impl PARAM_EXT_SET_DATA {
25522 pub const ENCODED_LEN: usize = 147usize;
25523 pub const DEFAULT: Self = Self {
25524 target_system: 0_u8,
25525 target_component: 0_u8,
25526 param_id: CharArray::new([0_u8; 16usize]),
25527 param_value: CharArray::new([0_u8; 128usize]),
25528 param_type: MavParamExtType::DEFAULT,
25529 };
25530 #[cfg(feature = "arbitrary")]
25531 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25532 use arbitrary::{Arbitrary, Unstructured};
25533 let mut buf = [0u8; 1024];
25534 rng.fill_bytes(&mut buf);
25535 let mut unstructured = Unstructured::new(&buf);
25536 Self::arbitrary(&mut unstructured).unwrap_or_default()
25537 }
25538}
25539impl Default for PARAM_EXT_SET_DATA {
25540 fn default() -> Self {
25541 Self::DEFAULT.clone()
25542 }
25543}
25544impl MessageData for PARAM_EXT_SET_DATA {
25545 type Message = MavMessage;
25546 const ID: u32 = 323u32;
25547 const NAME: &'static str = "PARAM_EXT_SET";
25548 const EXTRA_CRC: u8 = 78u8;
25549 const ENCODED_LEN: usize = 147usize;
25550 fn deser(
25551 _version: MavlinkVersion,
25552 __input: &[u8],
25553 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25554 let avail_len = __input.len();
25555 let mut payload_buf = [0; Self::ENCODED_LEN];
25556 let mut buf = if avail_len < Self::ENCODED_LEN {
25557 payload_buf[0..avail_len].copy_from_slice(__input);
25558 Bytes::new(&payload_buf)
25559 } else {
25560 Bytes::new(__input)
25561 };
25562 let mut __struct = Self::default();
25563 __struct.target_system = buf.get_u8()?;
25564 __struct.target_component = buf.get_u8()?;
25565 let mut tmp = [0_u8; 16usize];
25566 for v in &mut tmp {
25567 *v = buf.get_u8()?;
25568 }
25569 __struct.param_id = CharArray::new(tmp);
25570 let mut tmp = [0_u8; 128usize];
25571 for v in &mut tmp {
25572 *v = buf.get_u8()?;
25573 }
25574 __struct.param_value = CharArray::new(tmp);
25575 let tmp = buf.get_u8()?;
25576 __struct.param_type =
25577 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25578 enum_type: "MavParamExtType",
25579 value: tmp as u64,
25580 })?;
25581 Ok(__struct)
25582 }
25583 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25584 let mut __tmp = BytesMut::new(bytes);
25585 #[allow(clippy::absurd_extreme_comparisons)]
25586 #[allow(unused_comparisons)]
25587 if __tmp.remaining() < Self::ENCODED_LEN {
25588 panic!(
25589 "buffer is too small (need {} bytes, but got {})",
25590 Self::ENCODED_LEN,
25591 __tmp.remaining(),
25592 )
25593 }
25594 __tmp.put_u8(self.target_system);
25595 __tmp.put_u8(self.target_component);
25596 for val in &self.param_id {
25597 __tmp.put_u8(*val);
25598 }
25599 for val in &self.param_value {
25600 __tmp.put_u8(*val);
25601 }
25602 __tmp.put_u8(self.param_type as u8);
25603 if matches!(version, MavlinkVersion::V2) {
25604 let len = __tmp.len();
25605 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25606 } else {
25607 __tmp.len()
25608 }
25609 }
25610}
25611#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
25612#[doc = ""]
25613#[doc = "ID: 322"]
25614#[derive(Debug, Clone, PartialEq)]
25615#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25616#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25617#[cfg_attr(feature = "ts", derive(TS))]
25618#[cfg_attr(feature = "ts", ts(export))]
25619pub struct PARAM_EXT_VALUE_DATA {
25620 #[doc = "Total number of parameters"]
25621 pub param_count: u16,
25622 #[doc = "Index of this parameter"]
25623 pub param_index: u16,
25624 #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25625 #[cfg_attr(feature = "ts", ts(type = "string"))]
25626 pub param_id: CharArray<16>,
25627 #[doc = "Parameter value"]
25628 #[cfg_attr(feature = "ts", ts(type = "string"))]
25629 pub param_value: CharArray<128>,
25630 #[doc = "Parameter type."]
25631 pub param_type: MavParamExtType,
25632}
25633impl PARAM_EXT_VALUE_DATA {
25634 pub const ENCODED_LEN: usize = 149usize;
25635 pub const DEFAULT: Self = Self {
25636 param_count: 0_u16,
25637 param_index: 0_u16,
25638 param_id: CharArray::new([0_u8; 16usize]),
25639 param_value: CharArray::new([0_u8; 128usize]),
25640 param_type: MavParamExtType::DEFAULT,
25641 };
25642 #[cfg(feature = "arbitrary")]
25643 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25644 use arbitrary::{Arbitrary, Unstructured};
25645 let mut buf = [0u8; 1024];
25646 rng.fill_bytes(&mut buf);
25647 let mut unstructured = Unstructured::new(&buf);
25648 Self::arbitrary(&mut unstructured).unwrap_or_default()
25649 }
25650}
25651impl Default for PARAM_EXT_VALUE_DATA {
25652 fn default() -> Self {
25653 Self::DEFAULT.clone()
25654 }
25655}
25656impl MessageData for PARAM_EXT_VALUE_DATA {
25657 type Message = MavMessage;
25658 const ID: u32 = 322u32;
25659 const NAME: &'static str = "PARAM_EXT_VALUE";
25660 const EXTRA_CRC: u8 = 243u8;
25661 const ENCODED_LEN: usize = 149usize;
25662 fn deser(
25663 _version: MavlinkVersion,
25664 __input: &[u8],
25665 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25666 let avail_len = __input.len();
25667 let mut payload_buf = [0; Self::ENCODED_LEN];
25668 let mut buf = if avail_len < Self::ENCODED_LEN {
25669 payload_buf[0..avail_len].copy_from_slice(__input);
25670 Bytes::new(&payload_buf)
25671 } else {
25672 Bytes::new(__input)
25673 };
25674 let mut __struct = Self::default();
25675 __struct.param_count = buf.get_u16_le()?;
25676 __struct.param_index = buf.get_u16_le()?;
25677 let mut tmp = [0_u8; 16usize];
25678 for v in &mut tmp {
25679 *v = buf.get_u8()?;
25680 }
25681 __struct.param_id = CharArray::new(tmp);
25682 let mut tmp = [0_u8; 128usize];
25683 for v in &mut tmp {
25684 *v = buf.get_u8()?;
25685 }
25686 __struct.param_value = CharArray::new(tmp);
25687 let tmp = buf.get_u8()?;
25688 __struct.param_type =
25689 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25690 enum_type: "MavParamExtType",
25691 value: tmp as u64,
25692 })?;
25693 Ok(__struct)
25694 }
25695 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25696 let mut __tmp = BytesMut::new(bytes);
25697 #[allow(clippy::absurd_extreme_comparisons)]
25698 #[allow(unused_comparisons)]
25699 if __tmp.remaining() < Self::ENCODED_LEN {
25700 panic!(
25701 "buffer is too small (need {} bytes, but got {})",
25702 Self::ENCODED_LEN,
25703 __tmp.remaining(),
25704 )
25705 }
25706 __tmp.put_u16_le(self.param_count);
25707 __tmp.put_u16_le(self.param_index);
25708 for val in &self.param_id {
25709 __tmp.put_u8(*val);
25710 }
25711 for val in &self.param_value {
25712 __tmp.put_u8(*val);
25713 }
25714 __tmp.put_u8(self.param_type as u8);
25715 if matches!(version, MavlinkVersion::V2) {
25716 let len = __tmp.len();
25717 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25718 } else {
25719 __tmp.len()
25720 }
25721 }
25722}
25723#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
25724#[doc = ""]
25725#[doc = "ID: 50"]
25726#[derive(Debug, Clone, PartialEq)]
25727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25729#[cfg_attr(feature = "ts", derive(TS))]
25730#[cfg_attr(feature = "ts", ts(export))]
25731pub struct PARAM_MAP_RC_DATA {
25732 #[doc = "Initial parameter value"]
25733 pub param_value0: f32,
25734 #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
25735 pub scale: f32,
25736 #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
25737 pub param_value_min: f32,
25738 #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
25739 pub param_value_max: f32,
25740 #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
25741 pub param_index: i16,
25742 #[doc = "System ID"]
25743 pub target_system: u8,
25744 #[doc = "Component ID"]
25745 pub target_component: u8,
25746 #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25747 #[cfg_attr(feature = "ts", ts(type = "string"))]
25748 pub param_id: CharArray<16>,
25749 #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
25750 pub parameter_rc_channel_index: u8,
25751}
25752impl PARAM_MAP_RC_DATA {
25753 pub const ENCODED_LEN: usize = 37usize;
25754 pub const DEFAULT: Self = Self {
25755 param_value0: 0.0_f32,
25756 scale: 0.0_f32,
25757 param_value_min: 0.0_f32,
25758 param_value_max: 0.0_f32,
25759 param_index: 0_i16,
25760 target_system: 0_u8,
25761 target_component: 0_u8,
25762 param_id: CharArray::new([0_u8; 16usize]),
25763 parameter_rc_channel_index: 0_u8,
25764 };
25765 #[cfg(feature = "arbitrary")]
25766 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25767 use arbitrary::{Arbitrary, Unstructured};
25768 let mut buf = [0u8; 1024];
25769 rng.fill_bytes(&mut buf);
25770 let mut unstructured = Unstructured::new(&buf);
25771 Self::arbitrary(&mut unstructured).unwrap_or_default()
25772 }
25773}
25774impl Default for PARAM_MAP_RC_DATA {
25775 fn default() -> Self {
25776 Self::DEFAULT.clone()
25777 }
25778}
25779impl MessageData for PARAM_MAP_RC_DATA {
25780 type Message = MavMessage;
25781 const ID: u32 = 50u32;
25782 const NAME: &'static str = "PARAM_MAP_RC";
25783 const EXTRA_CRC: u8 = 78u8;
25784 const ENCODED_LEN: usize = 37usize;
25785 fn deser(
25786 _version: MavlinkVersion,
25787 __input: &[u8],
25788 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25789 let avail_len = __input.len();
25790 let mut payload_buf = [0; Self::ENCODED_LEN];
25791 let mut buf = if avail_len < Self::ENCODED_LEN {
25792 payload_buf[0..avail_len].copy_from_slice(__input);
25793 Bytes::new(&payload_buf)
25794 } else {
25795 Bytes::new(__input)
25796 };
25797 let mut __struct = Self::default();
25798 __struct.param_value0 = buf.get_f32_le()?;
25799 __struct.scale = buf.get_f32_le()?;
25800 __struct.param_value_min = buf.get_f32_le()?;
25801 __struct.param_value_max = buf.get_f32_le()?;
25802 __struct.param_index = buf.get_i16_le()?;
25803 __struct.target_system = buf.get_u8()?;
25804 __struct.target_component = buf.get_u8()?;
25805 let mut tmp = [0_u8; 16usize];
25806 for v in &mut tmp {
25807 *v = buf.get_u8()?;
25808 }
25809 __struct.param_id = CharArray::new(tmp);
25810 __struct.parameter_rc_channel_index = buf.get_u8()?;
25811 Ok(__struct)
25812 }
25813 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25814 let mut __tmp = BytesMut::new(bytes);
25815 #[allow(clippy::absurd_extreme_comparisons)]
25816 #[allow(unused_comparisons)]
25817 if __tmp.remaining() < Self::ENCODED_LEN {
25818 panic!(
25819 "buffer is too small (need {} bytes, but got {})",
25820 Self::ENCODED_LEN,
25821 __tmp.remaining(),
25822 )
25823 }
25824 __tmp.put_f32_le(self.param_value0);
25825 __tmp.put_f32_le(self.scale);
25826 __tmp.put_f32_le(self.param_value_min);
25827 __tmp.put_f32_le(self.param_value_max);
25828 __tmp.put_i16_le(self.param_index);
25829 __tmp.put_u8(self.target_system);
25830 __tmp.put_u8(self.target_component);
25831 for val in &self.param_id {
25832 __tmp.put_u8(*val);
25833 }
25834 __tmp.put_u8(self.parameter_rc_channel_index);
25835 if matches!(version, MavlinkVersion::V2) {
25836 let len = __tmp.len();
25837 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25838 } else {
25839 __tmp.len()
25840 }
25841 }
25842}
25843#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25844#[doc = ""]
25845#[doc = "ID: 21"]
25846#[derive(Debug, Clone, PartialEq)]
25847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25849#[cfg_attr(feature = "ts", derive(TS))]
25850#[cfg_attr(feature = "ts", ts(export))]
25851pub struct PARAM_REQUEST_LIST_DATA {
25852 #[doc = "System ID"]
25853 pub target_system: u8,
25854 #[doc = "Component ID"]
25855 pub target_component: u8,
25856}
25857impl PARAM_REQUEST_LIST_DATA {
25858 pub const ENCODED_LEN: usize = 2usize;
25859 pub const DEFAULT: Self = Self {
25860 target_system: 0_u8,
25861 target_component: 0_u8,
25862 };
25863 #[cfg(feature = "arbitrary")]
25864 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25865 use arbitrary::{Arbitrary, Unstructured};
25866 let mut buf = [0u8; 1024];
25867 rng.fill_bytes(&mut buf);
25868 let mut unstructured = Unstructured::new(&buf);
25869 Self::arbitrary(&mut unstructured).unwrap_or_default()
25870 }
25871}
25872impl Default for PARAM_REQUEST_LIST_DATA {
25873 fn default() -> Self {
25874 Self::DEFAULT.clone()
25875 }
25876}
25877impl MessageData for PARAM_REQUEST_LIST_DATA {
25878 type Message = MavMessage;
25879 const ID: u32 = 21u32;
25880 const NAME: &'static str = "PARAM_REQUEST_LIST";
25881 const EXTRA_CRC: u8 = 159u8;
25882 const ENCODED_LEN: usize = 2usize;
25883 fn deser(
25884 _version: MavlinkVersion,
25885 __input: &[u8],
25886 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25887 let avail_len = __input.len();
25888 let mut payload_buf = [0; Self::ENCODED_LEN];
25889 let mut buf = if avail_len < Self::ENCODED_LEN {
25890 payload_buf[0..avail_len].copy_from_slice(__input);
25891 Bytes::new(&payload_buf)
25892 } else {
25893 Bytes::new(__input)
25894 };
25895 let mut __struct = Self::default();
25896 __struct.target_system = buf.get_u8()?;
25897 __struct.target_component = buf.get_u8()?;
25898 Ok(__struct)
25899 }
25900 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25901 let mut __tmp = BytesMut::new(bytes);
25902 #[allow(clippy::absurd_extreme_comparisons)]
25903 #[allow(unused_comparisons)]
25904 if __tmp.remaining() < Self::ENCODED_LEN {
25905 panic!(
25906 "buffer is too small (need {} bytes, but got {})",
25907 Self::ENCODED_LEN,
25908 __tmp.remaining(),
25909 )
25910 }
25911 __tmp.put_u8(self.target_system);
25912 __tmp.put_u8(self.target_component);
25913 if matches!(version, MavlinkVersion::V2) {
25914 let len = __tmp.len();
25915 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25916 } else {
25917 __tmp.len()
25918 }
25919 }
25920}
25921#[doc = "Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] ->value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
25922#[doc = ""]
25923#[doc = "ID: 20"]
25924#[derive(Debug, Clone, PartialEq)]
25925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25927#[cfg_attr(feature = "ts", derive(TS))]
25928#[cfg_attr(feature = "ts", ts(export))]
25929pub struct PARAM_REQUEST_READ_DATA {
25930 #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
25931 pub param_index: i16,
25932 #[doc = "System ID"]
25933 pub target_system: u8,
25934 #[doc = "Component ID"]
25935 pub target_component: u8,
25936 #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25937 #[cfg_attr(feature = "ts", ts(type = "string"))]
25938 pub param_id: CharArray<16>,
25939}
25940impl PARAM_REQUEST_READ_DATA {
25941 pub const ENCODED_LEN: usize = 20usize;
25942 pub const DEFAULT: Self = Self {
25943 param_index: 0_i16,
25944 target_system: 0_u8,
25945 target_component: 0_u8,
25946 param_id: CharArray::new([0_u8; 16usize]),
25947 };
25948 #[cfg(feature = "arbitrary")]
25949 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25950 use arbitrary::{Arbitrary, Unstructured};
25951 let mut buf = [0u8; 1024];
25952 rng.fill_bytes(&mut buf);
25953 let mut unstructured = Unstructured::new(&buf);
25954 Self::arbitrary(&mut unstructured).unwrap_or_default()
25955 }
25956}
25957impl Default for PARAM_REQUEST_READ_DATA {
25958 fn default() -> Self {
25959 Self::DEFAULT.clone()
25960 }
25961}
25962impl MessageData for PARAM_REQUEST_READ_DATA {
25963 type Message = MavMessage;
25964 const ID: u32 = 20u32;
25965 const NAME: &'static str = "PARAM_REQUEST_READ";
25966 const EXTRA_CRC: u8 = 214u8;
25967 const ENCODED_LEN: usize = 20usize;
25968 fn deser(
25969 _version: MavlinkVersion,
25970 __input: &[u8],
25971 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25972 let avail_len = __input.len();
25973 let mut payload_buf = [0; Self::ENCODED_LEN];
25974 let mut buf = if avail_len < Self::ENCODED_LEN {
25975 payload_buf[0..avail_len].copy_from_slice(__input);
25976 Bytes::new(&payload_buf)
25977 } else {
25978 Bytes::new(__input)
25979 };
25980 let mut __struct = Self::default();
25981 __struct.param_index = buf.get_i16_le()?;
25982 __struct.target_system = buf.get_u8()?;
25983 __struct.target_component = buf.get_u8()?;
25984 let mut tmp = [0_u8; 16usize];
25985 for v in &mut tmp {
25986 *v = buf.get_u8()?;
25987 }
25988 __struct.param_id = CharArray::new(tmp);
25989 Ok(__struct)
25990 }
25991 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25992 let mut __tmp = BytesMut::new(bytes);
25993 #[allow(clippy::absurd_extreme_comparisons)]
25994 #[allow(unused_comparisons)]
25995 if __tmp.remaining() < Self::ENCODED_LEN {
25996 panic!(
25997 "buffer is too small (need {} bytes, but got {})",
25998 Self::ENCODED_LEN,
25999 __tmp.remaining(),
26000 )
26001 }
26002 __tmp.put_i16_le(self.param_index);
26003 __tmp.put_u8(self.target_system);
26004 __tmp.put_u8(self.target_component);
26005 for val in &self.param_id {
26006 __tmp.put_u8(*val);
26007 }
26008 if matches!(version, MavlinkVersion::V2) {
26009 let len = __tmp.len();
26010 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26011 } else {
26012 __tmp.len()
26013 }
26014 }
26015}
26016#[doc = "Set a parameter value (write new value to permanent storage). The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26017#[doc = ""]
26018#[doc = "ID: 23"]
26019#[derive(Debug, Clone, PartialEq)]
26020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26021#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26022#[cfg_attr(feature = "ts", derive(TS))]
26023#[cfg_attr(feature = "ts", ts(export))]
26024pub struct PARAM_SET_DATA {
26025 #[doc = "Onboard parameter value"]
26026 pub param_value: f32,
26027 #[doc = "System ID"]
26028 pub target_system: u8,
26029 #[doc = "Component ID"]
26030 pub target_component: u8,
26031 #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26032 #[cfg_attr(feature = "ts", ts(type = "string"))]
26033 pub param_id: CharArray<16>,
26034 #[doc = "Onboard parameter type."]
26035 pub param_type: MavParamType,
26036}
26037impl PARAM_SET_DATA {
26038 pub const ENCODED_LEN: usize = 23usize;
26039 pub const DEFAULT: Self = Self {
26040 param_value: 0.0_f32,
26041 target_system: 0_u8,
26042 target_component: 0_u8,
26043 param_id: CharArray::new([0_u8; 16usize]),
26044 param_type: MavParamType::DEFAULT,
26045 };
26046 #[cfg(feature = "arbitrary")]
26047 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26048 use arbitrary::{Arbitrary, Unstructured};
26049 let mut buf = [0u8; 1024];
26050 rng.fill_bytes(&mut buf);
26051 let mut unstructured = Unstructured::new(&buf);
26052 Self::arbitrary(&mut unstructured).unwrap_or_default()
26053 }
26054}
26055impl Default for PARAM_SET_DATA {
26056 fn default() -> Self {
26057 Self::DEFAULT.clone()
26058 }
26059}
26060impl MessageData for PARAM_SET_DATA {
26061 type Message = MavMessage;
26062 const ID: u32 = 23u32;
26063 const NAME: &'static str = "PARAM_SET";
26064 const EXTRA_CRC: u8 = 168u8;
26065 const ENCODED_LEN: usize = 23usize;
26066 fn deser(
26067 _version: MavlinkVersion,
26068 __input: &[u8],
26069 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26070 let avail_len = __input.len();
26071 let mut payload_buf = [0; Self::ENCODED_LEN];
26072 let mut buf = if avail_len < Self::ENCODED_LEN {
26073 payload_buf[0..avail_len].copy_from_slice(__input);
26074 Bytes::new(&payload_buf)
26075 } else {
26076 Bytes::new(__input)
26077 };
26078 let mut __struct = Self::default();
26079 __struct.param_value = buf.get_f32_le()?;
26080 __struct.target_system = buf.get_u8()?;
26081 __struct.target_component = buf.get_u8()?;
26082 let mut tmp = [0_u8; 16usize];
26083 for v in &mut tmp {
26084 *v = buf.get_u8()?;
26085 }
26086 __struct.param_id = CharArray::new(tmp);
26087 let tmp = buf.get_u8()?;
26088 __struct.param_type =
26089 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26090 enum_type: "MavParamType",
26091 value: tmp as u64,
26092 })?;
26093 Ok(__struct)
26094 }
26095 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26096 let mut __tmp = BytesMut::new(bytes);
26097 #[allow(clippy::absurd_extreme_comparisons)]
26098 #[allow(unused_comparisons)]
26099 if __tmp.remaining() < Self::ENCODED_LEN {
26100 panic!(
26101 "buffer is too small (need {} bytes, but got {})",
26102 Self::ENCODED_LEN,
26103 __tmp.remaining(),
26104 )
26105 }
26106 __tmp.put_f32_le(self.param_value);
26107 __tmp.put_u8(self.target_system);
26108 __tmp.put_u8(self.target_component);
26109 for val in &self.param_id {
26110 __tmp.put_u8(*val);
26111 }
26112 __tmp.put_u8(self.param_type as u8);
26113 if matches!(version, MavlinkVersion::V2) {
26114 let len = __tmp.len();
26115 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26116 } else {
26117 __tmp.len()
26118 }
26119 }
26120}
26121#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26122#[doc = ""]
26123#[doc = "ID: 22"]
26124#[derive(Debug, Clone, PartialEq)]
26125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26127#[cfg_attr(feature = "ts", derive(TS))]
26128#[cfg_attr(feature = "ts", ts(export))]
26129pub struct PARAM_VALUE_DATA {
26130 #[doc = "Onboard parameter value"]
26131 pub param_value: f32,
26132 #[doc = "Total number of onboard parameters"]
26133 pub param_count: u16,
26134 #[doc = "Index of this onboard parameter"]
26135 pub param_index: u16,
26136 #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26137 #[cfg_attr(feature = "ts", ts(type = "string"))]
26138 pub param_id: CharArray<16>,
26139 #[doc = "Onboard parameter type."]
26140 pub param_type: MavParamType,
26141}
26142impl PARAM_VALUE_DATA {
26143 pub const ENCODED_LEN: usize = 25usize;
26144 pub const DEFAULT: Self = Self {
26145 param_value: 0.0_f32,
26146 param_count: 0_u16,
26147 param_index: 0_u16,
26148 param_id: CharArray::new([0_u8; 16usize]),
26149 param_type: MavParamType::DEFAULT,
26150 };
26151 #[cfg(feature = "arbitrary")]
26152 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26153 use arbitrary::{Arbitrary, Unstructured};
26154 let mut buf = [0u8; 1024];
26155 rng.fill_bytes(&mut buf);
26156 let mut unstructured = Unstructured::new(&buf);
26157 Self::arbitrary(&mut unstructured).unwrap_or_default()
26158 }
26159}
26160impl Default for PARAM_VALUE_DATA {
26161 fn default() -> Self {
26162 Self::DEFAULT.clone()
26163 }
26164}
26165impl MessageData for PARAM_VALUE_DATA {
26166 type Message = MavMessage;
26167 const ID: u32 = 22u32;
26168 const NAME: &'static str = "PARAM_VALUE";
26169 const EXTRA_CRC: u8 = 220u8;
26170 const ENCODED_LEN: usize = 25usize;
26171 fn deser(
26172 _version: MavlinkVersion,
26173 __input: &[u8],
26174 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26175 let avail_len = __input.len();
26176 let mut payload_buf = [0; Self::ENCODED_LEN];
26177 let mut buf = if avail_len < Self::ENCODED_LEN {
26178 payload_buf[0..avail_len].copy_from_slice(__input);
26179 Bytes::new(&payload_buf)
26180 } else {
26181 Bytes::new(__input)
26182 };
26183 let mut __struct = Self::default();
26184 __struct.param_value = buf.get_f32_le()?;
26185 __struct.param_count = buf.get_u16_le()?;
26186 __struct.param_index = buf.get_u16_le()?;
26187 let mut tmp = [0_u8; 16usize];
26188 for v in &mut tmp {
26189 *v = buf.get_u8()?;
26190 }
26191 __struct.param_id = CharArray::new(tmp);
26192 let tmp = buf.get_u8()?;
26193 __struct.param_type =
26194 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26195 enum_type: "MavParamType",
26196 value: tmp as u64,
26197 })?;
26198 Ok(__struct)
26199 }
26200 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26201 let mut __tmp = BytesMut::new(bytes);
26202 #[allow(clippy::absurd_extreme_comparisons)]
26203 #[allow(unused_comparisons)]
26204 if __tmp.remaining() < Self::ENCODED_LEN {
26205 panic!(
26206 "buffer is too small (need {} bytes, but got {})",
26207 Self::ENCODED_LEN,
26208 __tmp.remaining(),
26209 )
26210 }
26211 __tmp.put_f32_le(self.param_value);
26212 __tmp.put_u16_le(self.param_count);
26213 __tmp.put_u16_le(self.param_index);
26214 for val in &self.param_id {
26215 __tmp.put_u8(*val);
26216 }
26217 __tmp.put_u8(self.param_type as u8);
26218 if matches!(version, MavlinkVersion::V2) {
26219 let len = __tmp.len();
26220 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26221 } else {
26222 __tmp.len()
26223 }
26224 }
26225}
26226#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
26227#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
26228#[doc = ""]
26229#[doc = "ID: 4"]
26230#[derive(Debug, Clone, PartialEq)]
26231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26233#[cfg_attr(feature = "ts", derive(TS))]
26234#[cfg_attr(feature = "ts", ts(export))]
26235pub struct PING_DATA {
26236 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26237 pub time_usec: u64,
26238 #[doc = "PING sequence"]
26239 pub seq: u32,
26240 #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
26241 pub target_system: u8,
26242 #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
26243 pub target_component: u8,
26244}
26245impl PING_DATA {
26246 pub const ENCODED_LEN: usize = 14usize;
26247 pub const DEFAULT: Self = Self {
26248 time_usec: 0_u64,
26249 seq: 0_u32,
26250 target_system: 0_u8,
26251 target_component: 0_u8,
26252 };
26253 #[cfg(feature = "arbitrary")]
26254 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26255 use arbitrary::{Arbitrary, Unstructured};
26256 let mut buf = [0u8; 1024];
26257 rng.fill_bytes(&mut buf);
26258 let mut unstructured = Unstructured::new(&buf);
26259 Self::arbitrary(&mut unstructured).unwrap_or_default()
26260 }
26261}
26262impl Default for PING_DATA {
26263 fn default() -> Self {
26264 Self::DEFAULT.clone()
26265 }
26266}
26267impl MessageData for PING_DATA {
26268 type Message = MavMessage;
26269 const ID: u32 = 4u32;
26270 const NAME: &'static str = "PING";
26271 const EXTRA_CRC: u8 = 237u8;
26272 const ENCODED_LEN: usize = 14usize;
26273 fn deser(
26274 _version: MavlinkVersion,
26275 __input: &[u8],
26276 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26277 let avail_len = __input.len();
26278 let mut payload_buf = [0; Self::ENCODED_LEN];
26279 let mut buf = if avail_len < Self::ENCODED_LEN {
26280 payload_buf[0..avail_len].copy_from_slice(__input);
26281 Bytes::new(&payload_buf)
26282 } else {
26283 Bytes::new(__input)
26284 };
26285 let mut __struct = Self::default();
26286 __struct.time_usec = buf.get_u64_le()?;
26287 __struct.seq = buf.get_u32_le()?;
26288 __struct.target_system = buf.get_u8()?;
26289 __struct.target_component = buf.get_u8()?;
26290 Ok(__struct)
26291 }
26292 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26293 let mut __tmp = BytesMut::new(bytes);
26294 #[allow(clippy::absurd_extreme_comparisons)]
26295 #[allow(unused_comparisons)]
26296 if __tmp.remaining() < Self::ENCODED_LEN {
26297 panic!(
26298 "buffer is too small (need {} bytes, but got {})",
26299 Self::ENCODED_LEN,
26300 __tmp.remaining(),
26301 )
26302 }
26303 __tmp.put_u64_le(self.time_usec);
26304 __tmp.put_u32_le(self.seq);
26305 __tmp.put_u8(self.target_system);
26306 __tmp.put_u8(self.target_component);
26307 if matches!(version, MavlinkVersion::V2) {
26308 let len = __tmp.len();
26309 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26310 } else {
26311 __tmp.len()
26312 }
26313 }
26314}
26315#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
26316#[doc = "Control vehicle tone generation (buzzer)."]
26317#[doc = ""]
26318#[doc = "ID: 258"]
26319#[derive(Debug, Clone, PartialEq)]
26320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26322#[cfg_attr(feature = "ts", derive(TS))]
26323#[cfg_attr(feature = "ts", ts(export))]
26324pub struct PLAY_TUNE_DATA {
26325 #[doc = "System ID"]
26326 pub target_system: u8,
26327 #[doc = "Component ID"]
26328 pub target_component: u8,
26329 #[doc = "tune in board specific format"]
26330 #[cfg_attr(feature = "ts", ts(type = "string"))]
26331 pub tune: CharArray<30>,
26332 #[doc = "tune extension (appended to tune)"]
26333 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26334 #[cfg_attr(feature = "ts", ts(type = "string"))]
26335 pub tune2: CharArray<200>,
26336}
26337impl PLAY_TUNE_DATA {
26338 pub const ENCODED_LEN: usize = 232usize;
26339 pub const DEFAULT: Self = Self {
26340 target_system: 0_u8,
26341 target_component: 0_u8,
26342 tune: CharArray::new([0_u8; 30usize]),
26343 tune2: CharArray::new([0_u8; 200usize]),
26344 };
26345 #[cfg(feature = "arbitrary")]
26346 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26347 use arbitrary::{Arbitrary, Unstructured};
26348 let mut buf = [0u8; 1024];
26349 rng.fill_bytes(&mut buf);
26350 let mut unstructured = Unstructured::new(&buf);
26351 Self::arbitrary(&mut unstructured).unwrap_or_default()
26352 }
26353}
26354impl Default for PLAY_TUNE_DATA {
26355 fn default() -> Self {
26356 Self::DEFAULT.clone()
26357 }
26358}
26359impl MessageData for PLAY_TUNE_DATA {
26360 type Message = MavMessage;
26361 const ID: u32 = 258u32;
26362 const NAME: &'static str = "PLAY_TUNE";
26363 const EXTRA_CRC: u8 = 187u8;
26364 const ENCODED_LEN: usize = 232usize;
26365 fn deser(
26366 _version: MavlinkVersion,
26367 __input: &[u8],
26368 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26369 let avail_len = __input.len();
26370 let mut payload_buf = [0; Self::ENCODED_LEN];
26371 let mut buf = if avail_len < Self::ENCODED_LEN {
26372 payload_buf[0..avail_len].copy_from_slice(__input);
26373 Bytes::new(&payload_buf)
26374 } else {
26375 Bytes::new(__input)
26376 };
26377 let mut __struct = Self::default();
26378 __struct.target_system = buf.get_u8()?;
26379 __struct.target_component = buf.get_u8()?;
26380 let mut tmp = [0_u8; 30usize];
26381 for v in &mut tmp {
26382 *v = buf.get_u8()?;
26383 }
26384 __struct.tune = CharArray::new(tmp);
26385 let mut tmp = [0_u8; 200usize];
26386 for v in &mut tmp {
26387 *v = buf.get_u8()?;
26388 }
26389 __struct.tune2 = CharArray::new(tmp);
26390 Ok(__struct)
26391 }
26392 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26393 let mut __tmp = BytesMut::new(bytes);
26394 #[allow(clippy::absurd_extreme_comparisons)]
26395 #[allow(unused_comparisons)]
26396 if __tmp.remaining() < Self::ENCODED_LEN {
26397 panic!(
26398 "buffer is too small (need {} bytes, but got {})",
26399 Self::ENCODED_LEN,
26400 __tmp.remaining(),
26401 )
26402 }
26403 __tmp.put_u8(self.target_system);
26404 __tmp.put_u8(self.target_component);
26405 for val in &self.tune {
26406 __tmp.put_u8(*val);
26407 }
26408 if matches!(version, MavlinkVersion::V2) {
26409 for val in &self.tune2 {
26410 __tmp.put_u8(*val);
26411 }
26412 let len = __tmp.len();
26413 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26414 } else {
26415 __tmp.len()
26416 }
26417 }
26418}
26419#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
26420#[doc = ""]
26421#[doc = "ID: 400"]
26422#[derive(Debug, Clone, PartialEq)]
26423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26424#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26425#[cfg_attr(feature = "ts", derive(TS))]
26426#[cfg_attr(feature = "ts", ts(export))]
26427pub struct PLAY_TUNE_V2_DATA {
26428 #[doc = "Tune format"]
26429 pub format: TuneFormat,
26430 #[doc = "System ID"]
26431 pub target_system: u8,
26432 #[doc = "Component ID"]
26433 pub target_component: u8,
26434 #[doc = "Tune definition as a NULL-terminated string."]
26435 #[cfg_attr(feature = "ts", ts(type = "string"))]
26436 pub tune: CharArray<248>,
26437}
26438impl PLAY_TUNE_V2_DATA {
26439 pub const ENCODED_LEN: usize = 254usize;
26440 pub const DEFAULT: Self = Self {
26441 format: TuneFormat::DEFAULT,
26442 target_system: 0_u8,
26443 target_component: 0_u8,
26444 tune: CharArray::new([0_u8; 248usize]),
26445 };
26446 #[cfg(feature = "arbitrary")]
26447 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26448 use arbitrary::{Arbitrary, Unstructured};
26449 let mut buf = [0u8; 1024];
26450 rng.fill_bytes(&mut buf);
26451 let mut unstructured = Unstructured::new(&buf);
26452 Self::arbitrary(&mut unstructured).unwrap_or_default()
26453 }
26454}
26455impl Default for PLAY_TUNE_V2_DATA {
26456 fn default() -> Self {
26457 Self::DEFAULT.clone()
26458 }
26459}
26460impl MessageData for PLAY_TUNE_V2_DATA {
26461 type Message = MavMessage;
26462 const ID: u32 = 400u32;
26463 const NAME: &'static str = "PLAY_TUNE_V2";
26464 const EXTRA_CRC: u8 = 110u8;
26465 const ENCODED_LEN: usize = 254usize;
26466 fn deser(
26467 _version: MavlinkVersion,
26468 __input: &[u8],
26469 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26470 let avail_len = __input.len();
26471 let mut payload_buf = [0; Self::ENCODED_LEN];
26472 let mut buf = if avail_len < Self::ENCODED_LEN {
26473 payload_buf[0..avail_len].copy_from_slice(__input);
26474 Bytes::new(&payload_buf)
26475 } else {
26476 Bytes::new(__input)
26477 };
26478 let mut __struct = Self::default();
26479 let tmp = buf.get_u32_le()?;
26480 __struct.format = FromPrimitive::from_u32(tmp).ok_or(
26481 ::mavlink_core::error::ParserError::InvalidEnum {
26482 enum_type: "TuneFormat",
26483 value: tmp as u64,
26484 },
26485 )?;
26486 __struct.target_system = buf.get_u8()?;
26487 __struct.target_component = buf.get_u8()?;
26488 let mut tmp = [0_u8; 248usize];
26489 for v in &mut tmp {
26490 *v = buf.get_u8()?;
26491 }
26492 __struct.tune = CharArray::new(tmp);
26493 Ok(__struct)
26494 }
26495 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26496 let mut __tmp = BytesMut::new(bytes);
26497 #[allow(clippy::absurd_extreme_comparisons)]
26498 #[allow(unused_comparisons)]
26499 if __tmp.remaining() < Self::ENCODED_LEN {
26500 panic!(
26501 "buffer is too small (need {} bytes, but got {})",
26502 Self::ENCODED_LEN,
26503 __tmp.remaining(),
26504 )
26505 }
26506 __tmp.put_u32_le(self.format as u32);
26507 __tmp.put_u8(self.target_system);
26508 __tmp.put_u8(self.target_component);
26509 for val in &self.tune {
26510 __tmp.put_u8(*val);
26511 }
26512 if matches!(version, MavlinkVersion::V2) {
26513 let len = __tmp.len();
26514 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26515 } else {
26516 __tmp.len()
26517 }
26518 }
26519}
26520#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
26521#[doc = ""]
26522#[doc = "ID: 87"]
26523#[derive(Debug, Clone, PartialEq)]
26524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26526#[cfg_attr(feature = "ts", derive(TS))]
26527#[cfg_attr(feature = "ts", ts(export))]
26528pub struct POSITION_TARGET_GLOBAL_INT_DATA {
26529 #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
26530 pub time_boot_ms: u32,
26531 #[doc = "Latitude in WGS84 frame"]
26532 pub lat_int: i32,
26533 #[doc = "Longitude in WGS84 frame"]
26534 pub lon_int: i32,
26535 #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
26536 pub alt: f32,
26537 #[doc = "X velocity in NED frame"]
26538 pub vx: f32,
26539 #[doc = "Y velocity in NED frame"]
26540 pub vy: f32,
26541 #[doc = "Z velocity in NED frame"]
26542 pub vz: f32,
26543 #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26544 pub afx: f32,
26545 #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26546 pub afy: f32,
26547 #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26548 pub afz: f32,
26549 #[doc = "yaw setpoint"]
26550 pub yaw: f32,
26551 #[doc = "yaw rate setpoint"]
26552 pub yaw_rate: f32,
26553 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26554 pub type_mask: PositionTargetTypemask,
26555 #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
26556 pub coordinate_frame: MavFrame,
26557}
26558impl POSITION_TARGET_GLOBAL_INT_DATA {
26559 pub const ENCODED_LEN: usize = 51usize;
26560 pub const DEFAULT: Self = Self {
26561 time_boot_ms: 0_u32,
26562 lat_int: 0_i32,
26563 lon_int: 0_i32,
26564 alt: 0.0_f32,
26565 vx: 0.0_f32,
26566 vy: 0.0_f32,
26567 vz: 0.0_f32,
26568 afx: 0.0_f32,
26569 afy: 0.0_f32,
26570 afz: 0.0_f32,
26571 yaw: 0.0_f32,
26572 yaw_rate: 0.0_f32,
26573 type_mask: PositionTargetTypemask::DEFAULT,
26574 coordinate_frame: MavFrame::DEFAULT,
26575 };
26576 #[cfg(feature = "arbitrary")]
26577 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26578 use arbitrary::{Arbitrary, Unstructured};
26579 let mut buf = [0u8; 1024];
26580 rng.fill_bytes(&mut buf);
26581 let mut unstructured = Unstructured::new(&buf);
26582 Self::arbitrary(&mut unstructured).unwrap_or_default()
26583 }
26584}
26585impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
26586 fn default() -> Self {
26587 Self::DEFAULT.clone()
26588 }
26589}
26590impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
26591 type Message = MavMessage;
26592 const ID: u32 = 87u32;
26593 const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
26594 const EXTRA_CRC: u8 = 150u8;
26595 const ENCODED_LEN: usize = 51usize;
26596 fn deser(
26597 _version: MavlinkVersion,
26598 __input: &[u8],
26599 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26600 let avail_len = __input.len();
26601 let mut payload_buf = [0; Self::ENCODED_LEN];
26602 let mut buf = if avail_len < Self::ENCODED_LEN {
26603 payload_buf[0..avail_len].copy_from_slice(__input);
26604 Bytes::new(&payload_buf)
26605 } else {
26606 Bytes::new(__input)
26607 };
26608 let mut __struct = Self::default();
26609 __struct.time_boot_ms = buf.get_u32_le()?;
26610 __struct.lat_int = buf.get_i32_le()?;
26611 __struct.lon_int = buf.get_i32_le()?;
26612 __struct.alt = buf.get_f32_le()?;
26613 __struct.vx = buf.get_f32_le()?;
26614 __struct.vy = buf.get_f32_le()?;
26615 __struct.vz = buf.get_f32_le()?;
26616 __struct.afx = buf.get_f32_le()?;
26617 __struct.afy = buf.get_f32_le()?;
26618 __struct.afz = buf.get_f32_le()?;
26619 __struct.yaw = buf.get_f32_le()?;
26620 __struct.yaw_rate = buf.get_f32_le()?;
26621 let tmp = buf.get_u16_le()?;
26622 __struct.type_mask =
26623 PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
26624 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26625 flag_type: "PositionTargetTypemask",
26626 value: tmp as u64,
26627 })?;
26628 let tmp = buf.get_u8()?;
26629 __struct.coordinate_frame =
26630 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26631 enum_type: "MavFrame",
26632 value: tmp as u64,
26633 })?;
26634 Ok(__struct)
26635 }
26636 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26637 let mut __tmp = BytesMut::new(bytes);
26638 #[allow(clippy::absurd_extreme_comparisons)]
26639 #[allow(unused_comparisons)]
26640 if __tmp.remaining() < Self::ENCODED_LEN {
26641 panic!(
26642 "buffer is too small (need {} bytes, but got {})",
26643 Self::ENCODED_LEN,
26644 __tmp.remaining(),
26645 )
26646 }
26647 __tmp.put_u32_le(self.time_boot_ms);
26648 __tmp.put_i32_le(self.lat_int);
26649 __tmp.put_i32_le(self.lon_int);
26650 __tmp.put_f32_le(self.alt);
26651 __tmp.put_f32_le(self.vx);
26652 __tmp.put_f32_le(self.vy);
26653 __tmp.put_f32_le(self.vz);
26654 __tmp.put_f32_le(self.afx);
26655 __tmp.put_f32_le(self.afy);
26656 __tmp.put_f32_le(self.afz);
26657 __tmp.put_f32_le(self.yaw);
26658 __tmp.put_f32_le(self.yaw_rate);
26659 __tmp.put_u16_le(self.type_mask.bits() as u16);
26660 __tmp.put_u8(self.coordinate_frame as u8);
26661 if matches!(version, MavlinkVersion::V2) {
26662 let len = __tmp.len();
26663 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26664 } else {
26665 __tmp.len()
26666 }
26667 }
26668}
26669#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
26670#[doc = ""]
26671#[doc = "ID: 85"]
26672#[derive(Debug, Clone, PartialEq)]
26673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26675#[cfg_attr(feature = "ts", derive(TS))]
26676#[cfg_attr(feature = "ts", ts(export))]
26677pub struct POSITION_TARGET_LOCAL_NED_DATA {
26678 #[doc = "Timestamp (time since system boot)."]
26679 pub time_boot_ms: u32,
26680 #[doc = "X Position in NED frame"]
26681 pub x: f32,
26682 #[doc = "Y Position in NED frame"]
26683 pub y: f32,
26684 #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
26685 pub z: f32,
26686 #[doc = "X velocity in NED frame"]
26687 pub vx: f32,
26688 #[doc = "Y velocity in NED frame"]
26689 pub vy: f32,
26690 #[doc = "Z velocity in NED frame"]
26691 pub vz: f32,
26692 #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26693 pub afx: f32,
26694 #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26695 pub afy: f32,
26696 #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26697 pub afz: f32,
26698 #[doc = "yaw setpoint"]
26699 pub yaw: f32,
26700 #[doc = "yaw rate setpoint"]
26701 pub yaw_rate: f32,
26702 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26703 pub type_mask: PositionTargetTypemask,
26704 #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
26705 pub coordinate_frame: MavFrame,
26706}
26707impl POSITION_TARGET_LOCAL_NED_DATA {
26708 pub const ENCODED_LEN: usize = 51usize;
26709 pub const DEFAULT: Self = Self {
26710 time_boot_ms: 0_u32,
26711 x: 0.0_f32,
26712 y: 0.0_f32,
26713 z: 0.0_f32,
26714 vx: 0.0_f32,
26715 vy: 0.0_f32,
26716 vz: 0.0_f32,
26717 afx: 0.0_f32,
26718 afy: 0.0_f32,
26719 afz: 0.0_f32,
26720 yaw: 0.0_f32,
26721 yaw_rate: 0.0_f32,
26722 type_mask: PositionTargetTypemask::DEFAULT,
26723 coordinate_frame: MavFrame::DEFAULT,
26724 };
26725 #[cfg(feature = "arbitrary")]
26726 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26727 use arbitrary::{Arbitrary, Unstructured};
26728 let mut buf = [0u8; 1024];
26729 rng.fill_bytes(&mut buf);
26730 let mut unstructured = Unstructured::new(&buf);
26731 Self::arbitrary(&mut unstructured).unwrap_or_default()
26732 }
26733}
26734impl Default for POSITION_TARGET_LOCAL_NED_DATA {
26735 fn default() -> Self {
26736 Self::DEFAULT.clone()
26737 }
26738}
26739impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
26740 type Message = MavMessage;
26741 const ID: u32 = 85u32;
26742 const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
26743 const EXTRA_CRC: u8 = 140u8;
26744 const ENCODED_LEN: usize = 51usize;
26745 fn deser(
26746 _version: MavlinkVersion,
26747 __input: &[u8],
26748 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26749 let avail_len = __input.len();
26750 let mut payload_buf = [0; Self::ENCODED_LEN];
26751 let mut buf = if avail_len < Self::ENCODED_LEN {
26752 payload_buf[0..avail_len].copy_from_slice(__input);
26753 Bytes::new(&payload_buf)
26754 } else {
26755 Bytes::new(__input)
26756 };
26757 let mut __struct = Self::default();
26758 __struct.time_boot_ms = buf.get_u32_le()?;
26759 __struct.x = buf.get_f32_le()?;
26760 __struct.y = buf.get_f32_le()?;
26761 __struct.z = buf.get_f32_le()?;
26762 __struct.vx = buf.get_f32_le()?;
26763 __struct.vy = buf.get_f32_le()?;
26764 __struct.vz = buf.get_f32_le()?;
26765 __struct.afx = buf.get_f32_le()?;
26766 __struct.afy = buf.get_f32_le()?;
26767 __struct.afz = buf.get_f32_le()?;
26768 __struct.yaw = buf.get_f32_le()?;
26769 __struct.yaw_rate = buf.get_f32_le()?;
26770 let tmp = buf.get_u16_le()?;
26771 __struct.type_mask =
26772 PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
26773 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26774 flag_type: "PositionTargetTypemask",
26775 value: tmp as u64,
26776 })?;
26777 let tmp = buf.get_u8()?;
26778 __struct.coordinate_frame =
26779 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26780 enum_type: "MavFrame",
26781 value: tmp as u64,
26782 })?;
26783 Ok(__struct)
26784 }
26785 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26786 let mut __tmp = BytesMut::new(bytes);
26787 #[allow(clippy::absurd_extreme_comparisons)]
26788 #[allow(unused_comparisons)]
26789 if __tmp.remaining() < Self::ENCODED_LEN {
26790 panic!(
26791 "buffer is too small (need {} bytes, but got {})",
26792 Self::ENCODED_LEN,
26793 __tmp.remaining(),
26794 )
26795 }
26796 __tmp.put_u32_le(self.time_boot_ms);
26797 __tmp.put_f32_le(self.x);
26798 __tmp.put_f32_le(self.y);
26799 __tmp.put_f32_le(self.z);
26800 __tmp.put_f32_le(self.vx);
26801 __tmp.put_f32_le(self.vy);
26802 __tmp.put_f32_le(self.vz);
26803 __tmp.put_f32_le(self.afx);
26804 __tmp.put_f32_le(self.afy);
26805 __tmp.put_f32_le(self.afz);
26806 __tmp.put_f32_le(self.yaw);
26807 __tmp.put_f32_le(self.yaw_rate);
26808 __tmp.put_u16_le(self.type_mask.bits() as u16);
26809 __tmp.put_u8(self.coordinate_frame as u8);
26810 if matches!(version, MavlinkVersion::V2) {
26811 let len = __tmp.len();
26812 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26813 } else {
26814 __tmp.len()
26815 }
26816 }
26817}
26818#[doc = "Power supply status."]
26819#[doc = ""]
26820#[doc = "ID: 125"]
26821#[derive(Debug, Clone, PartialEq)]
26822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26824#[cfg_attr(feature = "ts", derive(TS))]
26825#[cfg_attr(feature = "ts", ts(export))]
26826pub struct POWER_STATUS_DATA {
26827 #[doc = "5V rail voltage."]
26828 pub Vcc: u16,
26829 #[doc = "Servo rail voltage."]
26830 pub Vservo: u16,
26831 #[doc = "Bitmap of power supply status flags."]
26832 pub flags: MavPowerStatus,
26833}
26834impl POWER_STATUS_DATA {
26835 pub const ENCODED_LEN: usize = 6usize;
26836 pub const DEFAULT: Self = Self {
26837 Vcc: 0_u16,
26838 Vservo: 0_u16,
26839 flags: MavPowerStatus::DEFAULT,
26840 };
26841 #[cfg(feature = "arbitrary")]
26842 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26843 use arbitrary::{Arbitrary, Unstructured};
26844 let mut buf = [0u8; 1024];
26845 rng.fill_bytes(&mut buf);
26846 let mut unstructured = Unstructured::new(&buf);
26847 Self::arbitrary(&mut unstructured).unwrap_or_default()
26848 }
26849}
26850impl Default for POWER_STATUS_DATA {
26851 fn default() -> Self {
26852 Self::DEFAULT.clone()
26853 }
26854}
26855impl MessageData for POWER_STATUS_DATA {
26856 type Message = MavMessage;
26857 const ID: u32 = 125u32;
26858 const NAME: &'static str = "POWER_STATUS";
26859 const EXTRA_CRC: u8 = 203u8;
26860 const ENCODED_LEN: usize = 6usize;
26861 fn deser(
26862 _version: MavlinkVersion,
26863 __input: &[u8],
26864 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26865 let avail_len = __input.len();
26866 let mut payload_buf = [0; Self::ENCODED_LEN];
26867 let mut buf = if avail_len < Self::ENCODED_LEN {
26868 payload_buf[0..avail_len].copy_from_slice(__input);
26869 Bytes::new(&payload_buf)
26870 } else {
26871 Bytes::new(__input)
26872 };
26873 let mut __struct = Self::default();
26874 __struct.Vcc = buf.get_u16_le()?;
26875 __struct.Vservo = buf.get_u16_le()?;
26876 let tmp = buf.get_u16_le()?;
26877 __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
26878 ::mavlink_core::error::ParserError::InvalidFlag {
26879 flag_type: "MavPowerStatus",
26880 value: tmp as u64,
26881 },
26882 )?;
26883 Ok(__struct)
26884 }
26885 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26886 let mut __tmp = BytesMut::new(bytes);
26887 #[allow(clippy::absurd_extreme_comparisons)]
26888 #[allow(unused_comparisons)]
26889 if __tmp.remaining() < Self::ENCODED_LEN {
26890 panic!(
26891 "buffer is too small (need {} bytes, but got {})",
26892 Self::ENCODED_LEN,
26893 __tmp.remaining(),
26894 )
26895 }
26896 __tmp.put_u16_le(self.Vcc);
26897 __tmp.put_u16_le(self.Vservo);
26898 __tmp.put_u16_le(self.flags.bits() as u16);
26899 if matches!(version, MavlinkVersion::V2) {
26900 let len = __tmp.len();
26901 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26902 } else {
26903 __tmp.len()
26904 }
26905 }
26906}
26907#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
26908#[doc = ""]
26909#[doc = "ID: 300"]
26910#[derive(Debug, Clone, PartialEq)]
26911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26913#[cfg_attr(feature = "ts", derive(TS))]
26914#[cfg_attr(feature = "ts", ts(export))]
26915pub struct PROTOCOL_VERSION_DATA {
26916 #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
26917 pub version: u16,
26918 #[doc = "Minimum MAVLink version supported"]
26919 pub min_version: u16,
26920 #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
26921 pub max_version: u16,
26922 #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
26923 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26924 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26925 pub spec_version_hash: [u8; 8],
26926 #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
26927 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26928 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26929 pub library_version_hash: [u8; 8],
26930}
26931impl PROTOCOL_VERSION_DATA {
26932 pub const ENCODED_LEN: usize = 22usize;
26933 pub const DEFAULT: Self = Self {
26934 version: 0_u16,
26935 min_version: 0_u16,
26936 max_version: 0_u16,
26937 spec_version_hash: [0_u8; 8usize],
26938 library_version_hash: [0_u8; 8usize],
26939 };
26940 #[cfg(feature = "arbitrary")]
26941 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26942 use arbitrary::{Arbitrary, Unstructured};
26943 let mut buf = [0u8; 1024];
26944 rng.fill_bytes(&mut buf);
26945 let mut unstructured = Unstructured::new(&buf);
26946 Self::arbitrary(&mut unstructured).unwrap_or_default()
26947 }
26948}
26949impl Default for PROTOCOL_VERSION_DATA {
26950 fn default() -> Self {
26951 Self::DEFAULT.clone()
26952 }
26953}
26954impl MessageData for PROTOCOL_VERSION_DATA {
26955 type Message = MavMessage;
26956 const ID: u32 = 300u32;
26957 const NAME: &'static str = "PROTOCOL_VERSION";
26958 const EXTRA_CRC: u8 = 217u8;
26959 const ENCODED_LEN: usize = 22usize;
26960 fn deser(
26961 _version: MavlinkVersion,
26962 __input: &[u8],
26963 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26964 let avail_len = __input.len();
26965 let mut payload_buf = [0; Self::ENCODED_LEN];
26966 let mut buf = if avail_len < Self::ENCODED_LEN {
26967 payload_buf[0..avail_len].copy_from_slice(__input);
26968 Bytes::new(&payload_buf)
26969 } else {
26970 Bytes::new(__input)
26971 };
26972 let mut __struct = Self::default();
26973 __struct.version = buf.get_u16_le()?;
26974 __struct.min_version = buf.get_u16_le()?;
26975 __struct.max_version = buf.get_u16_le()?;
26976 for v in &mut __struct.spec_version_hash {
26977 let val = buf.get_u8()?;
26978 *v = val;
26979 }
26980 for v in &mut __struct.library_version_hash {
26981 let val = buf.get_u8()?;
26982 *v = val;
26983 }
26984 Ok(__struct)
26985 }
26986 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26987 let mut __tmp = BytesMut::new(bytes);
26988 #[allow(clippy::absurd_extreme_comparisons)]
26989 #[allow(unused_comparisons)]
26990 if __tmp.remaining() < Self::ENCODED_LEN {
26991 panic!(
26992 "buffer is too small (need {} bytes, but got {})",
26993 Self::ENCODED_LEN,
26994 __tmp.remaining(),
26995 )
26996 }
26997 __tmp.put_u16_le(self.version);
26998 __tmp.put_u16_le(self.min_version);
26999 __tmp.put_u16_le(self.max_version);
27000 for val in &self.spec_version_hash {
27001 __tmp.put_u8(*val);
27002 }
27003 for val in &self.library_version_hash {
27004 __tmp.put_u8(*val);
27005 }
27006 if matches!(version, MavlinkVersion::V2) {
27007 let len = __tmp.len();
27008 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27009 } else {
27010 __tmp.len()
27011 }
27012 }
27013}
27014#[doc = "Status generated by radio and injected into MAVLink stream."]
27015#[doc = ""]
27016#[doc = "ID: 109"]
27017#[derive(Debug, Clone, PartialEq)]
27018#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27019#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27020#[cfg_attr(feature = "ts", derive(TS))]
27021#[cfg_attr(feature = "ts", ts(export))]
27022pub struct RADIO_STATUS_DATA {
27023 #[doc = "Count of radio packet receive errors (since boot)."]
27024 pub rxerrors: u16,
27025 #[doc = "Count of error corrected radio packets (since boot)."]
27026 pub fixed: u16,
27027 #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27028 pub rssi: u8,
27029 #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27030 pub remrssi: u8,
27031 #[doc = "Remaining free transmitter buffer space."]
27032 pub txbuf: u8,
27033 #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
27034 pub noise: u8,
27035 #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
27036 pub remnoise: u8,
27037}
27038impl RADIO_STATUS_DATA {
27039 pub const ENCODED_LEN: usize = 9usize;
27040 pub const DEFAULT: Self = Self {
27041 rxerrors: 0_u16,
27042 fixed: 0_u16,
27043 rssi: 0_u8,
27044 remrssi: 0_u8,
27045 txbuf: 0_u8,
27046 noise: 0_u8,
27047 remnoise: 0_u8,
27048 };
27049 #[cfg(feature = "arbitrary")]
27050 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27051 use arbitrary::{Arbitrary, Unstructured};
27052 let mut buf = [0u8; 1024];
27053 rng.fill_bytes(&mut buf);
27054 let mut unstructured = Unstructured::new(&buf);
27055 Self::arbitrary(&mut unstructured).unwrap_or_default()
27056 }
27057}
27058impl Default for RADIO_STATUS_DATA {
27059 fn default() -> Self {
27060 Self::DEFAULT.clone()
27061 }
27062}
27063impl MessageData for RADIO_STATUS_DATA {
27064 type Message = MavMessage;
27065 const ID: u32 = 109u32;
27066 const NAME: &'static str = "RADIO_STATUS";
27067 const EXTRA_CRC: u8 = 185u8;
27068 const ENCODED_LEN: usize = 9usize;
27069 fn deser(
27070 _version: MavlinkVersion,
27071 __input: &[u8],
27072 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27073 let avail_len = __input.len();
27074 let mut payload_buf = [0; Self::ENCODED_LEN];
27075 let mut buf = if avail_len < Self::ENCODED_LEN {
27076 payload_buf[0..avail_len].copy_from_slice(__input);
27077 Bytes::new(&payload_buf)
27078 } else {
27079 Bytes::new(__input)
27080 };
27081 let mut __struct = Self::default();
27082 __struct.rxerrors = buf.get_u16_le()?;
27083 __struct.fixed = buf.get_u16_le()?;
27084 __struct.rssi = buf.get_u8()?;
27085 __struct.remrssi = buf.get_u8()?;
27086 __struct.txbuf = buf.get_u8()?;
27087 __struct.noise = buf.get_u8()?;
27088 __struct.remnoise = buf.get_u8()?;
27089 Ok(__struct)
27090 }
27091 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27092 let mut __tmp = BytesMut::new(bytes);
27093 #[allow(clippy::absurd_extreme_comparisons)]
27094 #[allow(unused_comparisons)]
27095 if __tmp.remaining() < Self::ENCODED_LEN {
27096 panic!(
27097 "buffer is too small (need {} bytes, but got {})",
27098 Self::ENCODED_LEN,
27099 __tmp.remaining(),
27100 )
27101 }
27102 __tmp.put_u16_le(self.rxerrors);
27103 __tmp.put_u16_le(self.fixed);
27104 __tmp.put_u8(self.rssi);
27105 __tmp.put_u8(self.remrssi);
27106 __tmp.put_u8(self.txbuf);
27107 __tmp.put_u8(self.noise);
27108 __tmp.put_u8(self.remnoise);
27109 if matches!(version, MavlinkVersion::V2) {
27110 let len = __tmp.len();
27111 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27112 } else {
27113 __tmp.len()
27114 }
27115 }
27116}
27117#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
27118#[doc = ""]
27119#[doc = "ID: 27"]
27120#[derive(Debug, Clone, PartialEq)]
27121#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27123#[cfg_attr(feature = "ts", derive(TS))]
27124#[cfg_attr(feature = "ts", ts(export))]
27125pub struct RAW_IMU_DATA {
27126 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27127 pub time_usec: u64,
27128 #[doc = "X acceleration (raw)"]
27129 pub xacc: i16,
27130 #[doc = "Y acceleration (raw)"]
27131 pub yacc: i16,
27132 #[doc = "Z acceleration (raw)"]
27133 pub zacc: i16,
27134 #[doc = "Angular speed around X axis (raw)"]
27135 pub xgyro: i16,
27136 #[doc = "Angular speed around Y axis (raw)"]
27137 pub ygyro: i16,
27138 #[doc = "Angular speed around Z axis (raw)"]
27139 pub zgyro: i16,
27140 #[doc = "X Magnetic field (raw)"]
27141 pub xmag: i16,
27142 #[doc = "Y Magnetic field (raw)"]
27143 pub ymag: i16,
27144 #[doc = "Z Magnetic field (raw)"]
27145 pub zmag: i16,
27146 #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
27147 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27148 pub id: u8,
27149 #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27150 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27151 pub temperature: i16,
27152}
27153impl RAW_IMU_DATA {
27154 pub const ENCODED_LEN: usize = 29usize;
27155 pub const DEFAULT: Self = Self {
27156 time_usec: 0_u64,
27157 xacc: 0_i16,
27158 yacc: 0_i16,
27159 zacc: 0_i16,
27160 xgyro: 0_i16,
27161 ygyro: 0_i16,
27162 zgyro: 0_i16,
27163 xmag: 0_i16,
27164 ymag: 0_i16,
27165 zmag: 0_i16,
27166 id: 0_u8,
27167 temperature: 0_i16,
27168 };
27169 #[cfg(feature = "arbitrary")]
27170 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27171 use arbitrary::{Arbitrary, Unstructured};
27172 let mut buf = [0u8; 1024];
27173 rng.fill_bytes(&mut buf);
27174 let mut unstructured = Unstructured::new(&buf);
27175 Self::arbitrary(&mut unstructured).unwrap_or_default()
27176 }
27177}
27178impl Default for RAW_IMU_DATA {
27179 fn default() -> Self {
27180 Self::DEFAULT.clone()
27181 }
27182}
27183impl MessageData for RAW_IMU_DATA {
27184 type Message = MavMessage;
27185 const ID: u32 = 27u32;
27186 const NAME: &'static str = "RAW_IMU";
27187 const EXTRA_CRC: u8 = 144u8;
27188 const ENCODED_LEN: usize = 29usize;
27189 fn deser(
27190 _version: MavlinkVersion,
27191 __input: &[u8],
27192 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27193 let avail_len = __input.len();
27194 let mut payload_buf = [0; Self::ENCODED_LEN];
27195 let mut buf = if avail_len < Self::ENCODED_LEN {
27196 payload_buf[0..avail_len].copy_from_slice(__input);
27197 Bytes::new(&payload_buf)
27198 } else {
27199 Bytes::new(__input)
27200 };
27201 let mut __struct = Self::default();
27202 __struct.time_usec = buf.get_u64_le()?;
27203 __struct.xacc = buf.get_i16_le()?;
27204 __struct.yacc = buf.get_i16_le()?;
27205 __struct.zacc = buf.get_i16_le()?;
27206 __struct.xgyro = buf.get_i16_le()?;
27207 __struct.ygyro = buf.get_i16_le()?;
27208 __struct.zgyro = buf.get_i16_le()?;
27209 __struct.xmag = buf.get_i16_le()?;
27210 __struct.ymag = buf.get_i16_le()?;
27211 __struct.zmag = buf.get_i16_le()?;
27212 __struct.id = buf.get_u8()?;
27213 __struct.temperature = buf.get_i16_le()?;
27214 Ok(__struct)
27215 }
27216 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27217 let mut __tmp = BytesMut::new(bytes);
27218 #[allow(clippy::absurd_extreme_comparisons)]
27219 #[allow(unused_comparisons)]
27220 if __tmp.remaining() < Self::ENCODED_LEN {
27221 panic!(
27222 "buffer is too small (need {} bytes, but got {})",
27223 Self::ENCODED_LEN,
27224 __tmp.remaining(),
27225 )
27226 }
27227 __tmp.put_u64_le(self.time_usec);
27228 __tmp.put_i16_le(self.xacc);
27229 __tmp.put_i16_le(self.yacc);
27230 __tmp.put_i16_le(self.zacc);
27231 __tmp.put_i16_le(self.xgyro);
27232 __tmp.put_i16_le(self.ygyro);
27233 __tmp.put_i16_le(self.zgyro);
27234 __tmp.put_i16_le(self.xmag);
27235 __tmp.put_i16_le(self.ymag);
27236 __tmp.put_i16_le(self.zmag);
27237 if matches!(version, MavlinkVersion::V2) {
27238 __tmp.put_u8(self.id);
27239 __tmp.put_i16_le(self.temperature);
27240 let len = __tmp.len();
27241 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27242 } else {
27243 __tmp.len()
27244 }
27245 }
27246}
27247#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
27248#[doc = ""]
27249#[doc = "ID: 28"]
27250#[derive(Debug, Clone, PartialEq)]
27251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27253#[cfg_attr(feature = "ts", derive(TS))]
27254#[cfg_attr(feature = "ts", ts(export))]
27255pub struct RAW_PRESSURE_DATA {
27256 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27257 pub time_usec: u64,
27258 #[doc = "Absolute pressure (raw)"]
27259 pub press_abs: i16,
27260 #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
27261 pub press_diff1: i16,
27262 #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
27263 pub press_diff2: i16,
27264 #[doc = "Raw Temperature measurement (raw)"]
27265 pub temperature: i16,
27266}
27267impl RAW_PRESSURE_DATA {
27268 pub const ENCODED_LEN: usize = 16usize;
27269 pub const DEFAULT: Self = Self {
27270 time_usec: 0_u64,
27271 press_abs: 0_i16,
27272 press_diff1: 0_i16,
27273 press_diff2: 0_i16,
27274 temperature: 0_i16,
27275 };
27276 #[cfg(feature = "arbitrary")]
27277 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27278 use arbitrary::{Arbitrary, Unstructured};
27279 let mut buf = [0u8; 1024];
27280 rng.fill_bytes(&mut buf);
27281 let mut unstructured = Unstructured::new(&buf);
27282 Self::arbitrary(&mut unstructured).unwrap_or_default()
27283 }
27284}
27285impl Default for RAW_PRESSURE_DATA {
27286 fn default() -> Self {
27287 Self::DEFAULT.clone()
27288 }
27289}
27290impl MessageData for RAW_PRESSURE_DATA {
27291 type Message = MavMessage;
27292 const ID: u32 = 28u32;
27293 const NAME: &'static str = "RAW_PRESSURE";
27294 const EXTRA_CRC: u8 = 67u8;
27295 const ENCODED_LEN: usize = 16usize;
27296 fn deser(
27297 _version: MavlinkVersion,
27298 __input: &[u8],
27299 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27300 let avail_len = __input.len();
27301 let mut payload_buf = [0; Self::ENCODED_LEN];
27302 let mut buf = if avail_len < Self::ENCODED_LEN {
27303 payload_buf[0..avail_len].copy_from_slice(__input);
27304 Bytes::new(&payload_buf)
27305 } else {
27306 Bytes::new(__input)
27307 };
27308 let mut __struct = Self::default();
27309 __struct.time_usec = buf.get_u64_le()?;
27310 __struct.press_abs = buf.get_i16_le()?;
27311 __struct.press_diff1 = buf.get_i16_le()?;
27312 __struct.press_diff2 = buf.get_i16_le()?;
27313 __struct.temperature = buf.get_i16_le()?;
27314 Ok(__struct)
27315 }
27316 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27317 let mut __tmp = BytesMut::new(bytes);
27318 #[allow(clippy::absurd_extreme_comparisons)]
27319 #[allow(unused_comparisons)]
27320 if __tmp.remaining() < Self::ENCODED_LEN {
27321 panic!(
27322 "buffer is too small (need {} bytes, but got {})",
27323 Self::ENCODED_LEN,
27324 __tmp.remaining(),
27325 )
27326 }
27327 __tmp.put_u64_le(self.time_usec);
27328 __tmp.put_i16_le(self.press_abs);
27329 __tmp.put_i16_le(self.press_diff1);
27330 __tmp.put_i16_le(self.press_diff2);
27331 __tmp.put_i16_le(self.temperature);
27332 if matches!(version, MavlinkVersion::V2) {
27333 let len = __tmp.len();
27334 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27335 } else {
27336 __tmp.len()
27337 }
27338 }
27339}
27340#[doc = "RPM sensor data message."]
27341#[doc = ""]
27342#[doc = "ID: 339"]
27343#[derive(Debug, Clone, PartialEq)]
27344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27346#[cfg_attr(feature = "ts", derive(TS))]
27347#[cfg_attr(feature = "ts", ts(export))]
27348pub struct RAW_RPM_DATA {
27349 #[doc = "Indicated rate"]
27350 pub frequency: f32,
27351 #[doc = "Index of this RPM sensor (0-indexed)"]
27352 pub index: u8,
27353}
27354impl RAW_RPM_DATA {
27355 pub const ENCODED_LEN: usize = 5usize;
27356 pub const DEFAULT: Self = Self {
27357 frequency: 0.0_f32,
27358 index: 0_u8,
27359 };
27360 #[cfg(feature = "arbitrary")]
27361 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27362 use arbitrary::{Arbitrary, Unstructured};
27363 let mut buf = [0u8; 1024];
27364 rng.fill_bytes(&mut buf);
27365 let mut unstructured = Unstructured::new(&buf);
27366 Self::arbitrary(&mut unstructured).unwrap_or_default()
27367 }
27368}
27369impl Default for RAW_RPM_DATA {
27370 fn default() -> Self {
27371 Self::DEFAULT.clone()
27372 }
27373}
27374impl MessageData for RAW_RPM_DATA {
27375 type Message = MavMessage;
27376 const ID: u32 = 339u32;
27377 const NAME: &'static str = "RAW_RPM";
27378 const EXTRA_CRC: u8 = 199u8;
27379 const ENCODED_LEN: usize = 5usize;
27380 fn deser(
27381 _version: MavlinkVersion,
27382 __input: &[u8],
27383 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27384 let avail_len = __input.len();
27385 let mut payload_buf = [0; Self::ENCODED_LEN];
27386 let mut buf = if avail_len < Self::ENCODED_LEN {
27387 payload_buf[0..avail_len].copy_from_slice(__input);
27388 Bytes::new(&payload_buf)
27389 } else {
27390 Bytes::new(__input)
27391 };
27392 let mut __struct = Self::default();
27393 __struct.frequency = buf.get_f32_le()?;
27394 __struct.index = buf.get_u8()?;
27395 Ok(__struct)
27396 }
27397 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27398 let mut __tmp = BytesMut::new(bytes);
27399 #[allow(clippy::absurd_extreme_comparisons)]
27400 #[allow(unused_comparisons)]
27401 if __tmp.remaining() < Self::ENCODED_LEN {
27402 panic!(
27403 "buffer is too small (need {} bytes, but got {})",
27404 Self::ENCODED_LEN,
27405 __tmp.remaining(),
27406 )
27407 }
27408 __tmp.put_f32_le(self.frequency);
27409 __tmp.put_u8(self.index);
27410 if matches!(version, MavlinkVersion::V2) {
27411 let len = __tmp.len();
27412 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27413 } else {
27414 __tmp.len()
27415 }
27416 }
27417}
27418#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
27419#[doc = ""]
27420#[doc = "ID: 65"]
27421#[derive(Debug, Clone, PartialEq)]
27422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27424#[cfg_attr(feature = "ts", derive(TS))]
27425#[cfg_attr(feature = "ts", ts(export))]
27426pub struct RC_CHANNELS_DATA {
27427 #[doc = "Timestamp (time since system boot)."]
27428 pub time_boot_ms: u32,
27429 #[doc = "RC channel 1 value."]
27430 pub chan1_raw: u16,
27431 #[doc = "RC channel 2 value."]
27432 pub chan2_raw: u16,
27433 #[doc = "RC channel 3 value."]
27434 pub chan3_raw: u16,
27435 #[doc = "RC channel 4 value."]
27436 pub chan4_raw: u16,
27437 #[doc = "RC channel 5 value."]
27438 pub chan5_raw: u16,
27439 #[doc = "RC channel 6 value."]
27440 pub chan6_raw: u16,
27441 #[doc = "RC channel 7 value."]
27442 pub chan7_raw: u16,
27443 #[doc = "RC channel 8 value."]
27444 pub chan8_raw: u16,
27445 #[doc = "RC channel 9 value."]
27446 pub chan9_raw: u16,
27447 #[doc = "RC channel 10 value."]
27448 pub chan10_raw: u16,
27449 #[doc = "RC channel 11 value."]
27450 pub chan11_raw: u16,
27451 #[doc = "RC channel 12 value."]
27452 pub chan12_raw: u16,
27453 #[doc = "RC channel 13 value."]
27454 pub chan13_raw: u16,
27455 #[doc = "RC channel 14 value."]
27456 pub chan14_raw: u16,
27457 #[doc = "RC channel 15 value."]
27458 pub chan15_raw: u16,
27459 #[doc = "RC channel 16 value."]
27460 pub chan16_raw: u16,
27461 #[doc = "RC channel 17 value."]
27462 pub chan17_raw: u16,
27463 #[doc = "RC channel 18 value."]
27464 pub chan18_raw: u16,
27465 #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
27466 pub chancount: u8,
27467 #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27468 pub rssi: u8,
27469}
27470impl RC_CHANNELS_DATA {
27471 pub const ENCODED_LEN: usize = 42usize;
27472 pub const DEFAULT: Self = Self {
27473 time_boot_ms: 0_u32,
27474 chan1_raw: 0_u16,
27475 chan2_raw: 0_u16,
27476 chan3_raw: 0_u16,
27477 chan4_raw: 0_u16,
27478 chan5_raw: 0_u16,
27479 chan6_raw: 0_u16,
27480 chan7_raw: 0_u16,
27481 chan8_raw: 0_u16,
27482 chan9_raw: 0_u16,
27483 chan10_raw: 0_u16,
27484 chan11_raw: 0_u16,
27485 chan12_raw: 0_u16,
27486 chan13_raw: 0_u16,
27487 chan14_raw: 0_u16,
27488 chan15_raw: 0_u16,
27489 chan16_raw: 0_u16,
27490 chan17_raw: 0_u16,
27491 chan18_raw: 0_u16,
27492 chancount: 0_u8,
27493 rssi: 0_u8,
27494 };
27495 #[cfg(feature = "arbitrary")]
27496 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27497 use arbitrary::{Arbitrary, Unstructured};
27498 let mut buf = [0u8; 1024];
27499 rng.fill_bytes(&mut buf);
27500 let mut unstructured = Unstructured::new(&buf);
27501 Self::arbitrary(&mut unstructured).unwrap_or_default()
27502 }
27503}
27504impl Default for RC_CHANNELS_DATA {
27505 fn default() -> Self {
27506 Self::DEFAULT.clone()
27507 }
27508}
27509impl MessageData for RC_CHANNELS_DATA {
27510 type Message = MavMessage;
27511 const ID: u32 = 65u32;
27512 const NAME: &'static str = "RC_CHANNELS";
27513 const EXTRA_CRC: u8 = 118u8;
27514 const ENCODED_LEN: usize = 42usize;
27515 fn deser(
27516 _version: MavlinkVersion,
27517 __input: &[u8],
27518 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27519 let avail_len = __input.len();
27520 let mut payload_buf = [0; Self::ENCODED_LEN];
27521 let mut buf = if avail_len < Self::ENCODED_LEN {
27522 payload_buf[0..avail_len].copy_from_slice(__input);
27523 Bytes::new(&payload_buf)
27524 } else {
27525 Bytes::new(__input)
27526 };
27527 let mut __struct = Self::default();
27528 __struct.time_boot_ms = buf.get_u32_le()?;
27529 __struct.chan1_raw = buf.get_u16_le()?;
27530 __struct.chan2_raw = buf.get_u16_le()?;
27531 __struct.chan3_raw = buf.get_u16_le()?;
27532 __struct.chan4_raw = buf.get_u16_le()?;
27533 __struct.chan5_raw = buf.get_u16_le()?;
27534 __struct.chan6_raw = buf.get_u16_le()?;
27535 __struct.chan7_raw = buf.get_u16_le()?;
27536 __struct.chan8_raw = buf.get_u16_le()?;
27537 __struct.chan9_raw = buf.get_u16_le()?;
27538 __struct.chan10_raw = buf.get_u16_le()?;
27539 __struct.chan11_raw = buf.get_u16_le()?;
27540 __struct.chan12_raw = buf.get_u16_le()?;
27541 __struct.chan13_raw = buf.get_u16_le()?;
27542 __struct.chan14_raw = buf.get_u16_le()?;
27543 __struct.chan15_raw = buf.get_u16_le()?;
27544 __struct.chan16_raw = buf.get_u16_le()?;
27545 __struct.chan17_raw = buf.get_u16_le()?;
27546 __struct.chan18_raw = buf.get_u16_le()?;
27547 __struct.chancount = buf.get_u8()?;
27548 __struct.rssi = buf.get_u8()?;
27549 Ok(__struct)
27550 }
27551 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27552 let mut __tmp = BytesMut::new(bytes);
27553 #[allow(clippy::absurd_extreme_comparisons)]
27554 #[allow(unused_comparisons)]
27555 if __tmp.remaining() < Self::ENCODED_LEN {
27556 panic!(
27557 "buffer is too small (need {} bytes, but got {})",
27558 Self::ENCODED_LEN,
27559 __tmp.remaining(),
27560 )
27561 }
27562 __tmp.put_u32_le(self.time_boot_ms);
27563 __tmp.put_u16_le(self.chan1_raw);
27564 __tmp.put_u16_le(self.chan2_raw);
27565 __tmp.put_u16_le(self.chan3_raw);
27566 __tmp.put_u16_le(self.chan4_raw);
27567 __tmp.put_u16_le(self.chan5_raw);
27568 __tmp.put_u16_le(self.chan6_raw);
27569 __tmp.put_u16_le(self.chan7_raw);
27570 __tmp.put_u16_le(self.chan8_raw);
27571 __tmp.put_u16_le(self.chan9_raw);
27572 __tmp.put_u16_le(self.chan10_raw);
27573 __tmp.put_u16_le(self.chan11_raw);
27574 __tmp.put_u16_le(self.chan12_raw);
27575 __tmp.put_u16_le(self.chan13_raw);
27576 __tmp.put_u16_le(self.chan14_raw);
27577 __tmp.put_u16_le(self.chan15_raw);
27578 __tmp.put_u16_le(self.chan16_raw);
27579 __tmp.put_u16_le(self.chan17_raw);
27580 __tmp.put_u16_le(self.chan18_raw);
27581 __tmp.put_u8(self.chancount);
27582 __tmp.put_u8(self.rssi);
27583 if matches!(version, MavlinkVersion::V2) {
27584 let len = __tmp.len();
27585 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27586 } else {
27587 __tmp.len()
27588 }
27589 }
27590}
27591#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
27592#[doc = ""]
27593#[doc = "ID: 70"]
27594#[derive(Debug, Clone, PartialEq)]
27595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27597#[cfg_attr(feature = "ts", derive(TS))]
27598#[cfg_attr(feature = "ts", ts(export))]
27599pub struct RC_CHANNELS_OVERRIDE_DATA {
27600 #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27601 pub chan1_raw: u16,
27602 #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27603 pub chan2_raw: u16,
27604 #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27605 pub chan3_raw: u16,
27606 #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27607 pub chan4_raw: u16,
27608 #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27609 pub chan5_raw: u16,
27610 #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27611 pub chan6_raw: u16,
27612 #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27613 pub chan7_raw: u16,
27614 #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27615 pub chan8_raw: u16,
27616 #[doc = "System ID"]
27617 pub target_system: u8,
27618 #[doc = "Component ID"]
27619 pub target_component: u8,
27620 #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27621 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27622 pub chan9_raw: u16,
27623 #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27624 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27625 pub chan10_raw: u16,
27626 #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27627 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27628 pub chan11_raw: u16,
27629 #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27630 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27631 pub chan12_raw: u16,
27632 #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27633 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27634 pub chan13_raw: u16,
27635 #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27636 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27637 pub chan14_raw: u16,
27638 #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27639 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27640 pub chan15_raw: u16,
27641 #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27642 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27643 pub chan16_raw: u16,
27644 #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27645 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27646 pub chan17_raw: u16,
27647 #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27648 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27649 pub chan18_raw: u16,
27650}
27651impl RC_CHANNELS_OVERRIDE_DATA {
27652 pub const ENCODED_LEN: usize = 38usize;
27653 pub const DEFAULT: Self = Self {
27654 chan1_raw: 0_u16,
27655 chan2_raw: 0_u16,
27656 chan3_raw: 0_u16,
27657 chan4_raw: 0_u16,
27658 chan5_raw: 0_u16,
27659 chan6_raw: 0_u16,
27660 chan7_raw: 0_u16,
27661 chan8_raw: 0_u16,
27662 target_system: 0_u8,
27663 target_component: 0_u8,
27664 chan9_raw: 0_u16,
27665 chan10_raw: 0_u16,
27666 chan11_raw: 0_u16,
27667 chan12_raw: 0_u16,
27668 chan13_raw: 0_u16,
27669 chan14_raw: 0_u16,
27670 chan15_raw: 0_u16,
27671 chan16_raw: 0_u16,
27672 chan17_raw: 0_u16,
27673 chan18_raw: 0_u16,
27674 };
27675 #[cfg(feature = "arbitrary")]
27676 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27677 use arbitrary::{Arbitrary, Unstructured};
27678 let mut buf = [0u8; 1024];
27679 rng.fill_bytes(&mut buf);
27680 let mut unstructured = Unstructured::new(&buf);
27681 Self::arbitrary(&mut unstructured).unwrap_or_default()
27682 }
27683}
27684impl Default for RC_CHANNELS_OVERRIDE_DATA {
27685 fn default() -> Self {
27686 Self::DEFAULT.clone()
27687 }
27688}
27689impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
27690 type Message = MavMessage;
27691 const ID: u32 = 70u32;
27692 const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
27693 const EXTRA_CRC: u8 = 124u8;
27694 const ENCODED_LEN: usize = 38usize;
27695 fn deser(
27696 _version: MavlinkVersion,
27697 __input: &[u8],
27698 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27699 let avail_len = __input.len();
27700 let mut payload_buf = [0; Self::ENCODED_LEN];
27701 let mut buf = if avail_len < Self::ENCODED_LEN {
27702 payload_buf[0..avail_len].copy_from_slice(__input);
27703 Bytes::new(&payload_buf)
27704 } else {
27705 Bytes::new(__input)
27706 };
27707 let mut __struct = Self::default();
27708 __struct.chan1_raw = buf.get_u16_le()?;
27709 __struct.chan2_raw = buf.get_u16_le()?;
27710 __struct.chan3_raw = buf.get_u16_le()?;
27711 __struct.chan4_raw = buf.get_u16_le()?;
27712 __struct.chan5_raw = buf.get_u16_le()?;
27713 __struct.chan6_raw = buf.get_u16_le()?;
27714 __struct.chan7_raw = buf.get_u16_le()?;
27715 __struct.chan8_raw = buf.get_u16_le()?;
27716 __struct.target_system = buf.get_u8()?;
27717 __struct.target_component = buf.get_u8()?;
27718 __struct.chan9_raw = buf.get_u16_le()?;
27719 __struct.chan10_raw = buf.get_u16_le()?;
27720 __struct.chan11_raw = buf.get_u16_le()?;
27721 __struct.chan12_raw = buf.get_u16_le()?;
27722 __struct.chan13_raw = buf.get_u16_le()?;
27723 __struct.chan14_raw = buf.get_u16_le()?;
27724 __struct.chan15_raw = buf.get_u16_le()?;
27725 __struct.chan16_raw = buf.get_u16_le()?;
27726 __struct.chan17_raw = buf.get_u16_le()?;
27727 __struct.chan18_raw = buf.get_u16_le()?;
27728 Ok(__struct)
27729 }
27730 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27731 let mut __tmp = BytesMut::new(bytes);
27732 #[allow(clippy::absurd_extreme_comparisons)]
27733 #[allow(unused_comparisons)]
27734 if __tmp.remaining() < Self::ENCODED_LEN {
27735 panic!(
27736 "buffer is too small (need {} bytes, but got {})",
27737 Self::ENCODED_LEN,
27738 __tmp.remaining(),
27739 )
27740 }
27741 __tmp.put_u16_le(self.chan1_raw);
27742 __tmp.put_u16_le(self.chan2_raw);
27743 __tmp.put_u16_le(self.chan3_raw);
27744 __tmp.put_u16_le(self.chan4_raw);
27745 __tmp.put_u16_le(self.chan5_raw);
27746 __tmp.put_u16_le(self.chan6_raw);
27747 __tmp.put_u16_le(self.chan7_raw);
27748 __tmp.put_u16_le(self.chan8_raw);
27749 __tmp.put_u8(self.target_system);
27750 __tmp.put_u8(self.target_component);
27751 if matches!(version, MavlinkVersion::V2) {
27752 __tmp.put_u16_le(self.chan9_raw);
27753 __tmp.put_u16_le(self.chan10_raw);
27754 __tmp.put_u16_le(self.chan11_raw);
27755 __tmp.put_u16_le(self.chan12_raw);
27756 __tmp.put_u16_le(self.chan13_raw);
27757 __tmp.put_u16_le(self.chan14_raw);
27758 __tmp.put_u16_le(self.chan15_raw);
27759 __tmp.put_u16_le(self.chan16_raw);
27760 __tmp.put_u16_le(self.chan17_raw);
27761 __tmp.put_u16_le(self.chan18_raw);
27762 let len = __tmp.len();
27763 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27764 } else {
27765 __tmp.len()
27766 }
27767 }
27768}
27769#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
27770#[doc = ""]
27771#[doc = "ID: 35"]
27772#[derive(Debug, Clone, PartialEq)]
27773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27775#[cfg_attr(feature = "ts", derive(TS))]
27776#[cfg_attr(feature = "ts", ts(export))]
27777pub struct RC_CHANNELS_RAW_DATA {
27778 #[doc = "Timestamp (time since system boot)."]
27779 pub time_boot_ms: u32,
27780 #[doc = "RC channel 1 value."]
27781 pub chan1_raw: u16,
27782 #[doc = "RC channel 2 value."]
27783 pub chan2_raw: u16,
27784 #[doc = "RC channel 3 value."]
27785 pub chan3_raw: u16,
27786 #[doc = "RC channel 4 value."]
27787 pub chan4_raw: u16,
27788 #[doc = "RC channel 5 value."]
27789 pub chan5_raw: u16,
27790 #[doc = "RC channel 6 value."]
27791 pub chan6_raw: u16,
27792 #[doc = "RC channel 7 value."]
27793 pub chan7_raw: u16,
27794 #[doc = "RC channel 8 value."]
27795 pub chan8_raw: u16,
27796 #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27797 pub port: u8,
27798 #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27799 pub rssi: u8,
27800}
27801impl RC_CHANNELS_RAW_DATA {
27802 pub const ENCODED_LEN: usize = 22usize;
27803 pub const DEFAULT: Self = Self {
27804 time_boot_ms: 0_u32,
27805 chan1_raw: 0_u16,
27806 chan2_raw: 0_u16,
27807 chan3_raw: 0_u16,
27808 chan4_raw: 0_u16,
27809 chan5_raw: 0_u16,
27810 chan6_raw: 0_u16,
27811 chan7_raw: 0_u16,
27812 chan8_raw: 0_u16,
27813 port: 0_u8,
27814 rssi: 0_u8,
27815 };
27816 #[cfg(feature = "arbitrary")]
27817 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27818 use arbitrary::{Arbitrary, Unstructured};
27819 let mut buf = [0u8; 1024];
27820 rng.fill_bytes(&mut buf);
27821 let mut unstructured = Unstructured::new(&buf);
27822 Self::arbitrary(&mut unstructured).unwrap_or_default()
27823 }
27824}
27825impl Default for RC_CHANNELS_RAW_DATA {
27826 fn default() -> Self {
27827 Self::DEFAULT.clone()
27828 }
27829}
27830impl MessageData for RC_CHANNELS_RAW_DATA {
27831 type Message = MavMessage;
27832 const ID: u32 = 35u32;
27833 const NAME: &'static str = "RC_CHANNELS_RAW";
27834 const EXTRA_CRC: u8 = 244u8;
27835 const ENCODED_LEN: usize = 22usize;
27836 fn deser(
27837 _version: MavlinkVersion,
27838 __input: &[u8],
27839 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27840 let avail_len = __input.len();
27841 let mut payload_buf = [0; Self::ENCODED_LEN];
27842 let mut buf = if avail_len < Self::ENCODED_LEN {
27843 payload_buf[0..avail_len].copy_from_slice(__input);
27844 Bytes::new(&payload_buf)
27845 } else {
27846 Bytes::new(__input)
27847 };
27848 let mut __struct = Self::default();
27849 __struct.time_boot_ms = buf.get_u32_le()?;
27850 __struct.chan1_raw = buf.get_u16_le()?;
27851 __struct.chan2_raw = buf.get_u16_le()?;
27852 __struct.chan3_raw = buf.get_u16_le()?;
27853 __struct.chan4_raw = buf.get_u16_le()?;
27854 __struct.chan5_raw = buf.get_u16_le()?;
27855 __struct.chan6_raw = buf.get_u16_le()?;
27856 __struct.chan7_raw = buf.get_u16_le()?;
27857 __struct.chan8_raw = buf.get_u16_le()?;
27858 __struct.port = buf.get_u8()?;
27859 __struct.rssi = buf.get_u8()?;
27860 Ok(__struct)
27861 }
27862 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27863 let mut __tmp = BytesMut::new(bytes);
27864 #[allow(clippy::absurd_extreme_comparisons)]
27865 #[allow(unused_comparisons)]
27866 if __tmp.remaining() < Self::ENCODED_LEN {
27867 panic!(
27868 "buffer is too small (need {} bytes, but got {})",
27869 Self::ENCODED_LEN,
27870 __tmp.remaining(),
27871 )
27872 }
27873 __tmp.put_u32_le(self.time_boot_ms);
27874 __tmp.put_u16_le(self.chan1_raw);
27875 __tmp.put_u16_le(self.chan2_raw);
27876 __tmp.put_u16_le(self.chan3_raw);
27877 __tmp.put_u16_le(self.chan4_raw);
27878 __tmp.put_u16_le(self.chan5_raw);
27879 __tmp.put_u16_le(self.chan6_raw);
27880 __tmp.put_u16_le(self.chan7_raw);
27881 __tmp.put_u16_le(self.chan8_raw);
27882 __tmp.put_u8(self.port);
27883 __tmp.put_u8(self.rssi);
27884 if matches!(version, MavlinkVersion::V2) {
27885 let len = __tmp.len();
27886 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27887 } else {
27888 __tmp.len()
27889 }
27890 }
27891}
27892#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
27893#[doc = ""]
27894#[doc = "ID: 34"]
27895#[derive(Debug, Clone, PartialEq)]
27896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27898#[cfg_attr(feature = "ts", derive(TS))]
27899#[cfg_attr(feature = "ts", ts(export))]
27900pub struct RC_CHANNELS_SCALED_DATA {
27901 #[doc = "Timestamp (time since system boot)."]
27902 pub time_boot_ms: u32,
27903 #[doc = "RC channel 1 value scaled."]
27904 pub chan1_scaled: i16,
27905 #[doc = "RC channel 2 value scaled."]
27906 pub chan2_scaled: i16,
27907 #[doc = "RC channel 3 value scaled."]
27908 pub chan3_scaled: i16,
27909 #[doc = "RC channel 4 value scaled."]
27910 pub chan4_scaled: i16,
27911 #[doc = "RC channel 5 value scaled."]
27912 pub chan5_scaled: i16,
27913 #[doc = "RC channel 6 value scaled."]
27914 pub chan6_scaled: i16,
27915 #[doc = "RC channel 7 value scaled."]
27916 pub chan7_scaled: i16,
27917 #[doc = "RC channel 8 value scaled."]
27918 pub chan8_scaled: i16,
27919 #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27920 pub port: u8,
27921 #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27922 pub rssi: u8,
27923}
27924impl RC_CHANNELS_SCALED_DATA {
27925 pub const ENCODED_LEN: usize = 22usize;
27926 pub const DEFAULT: Self = Self {
27927 time_boot_ms: 0_u32,
27928 chan1_scaled: 0_i16,
27929 chan2_scaled: 0_i16,
27930 chan3_scaled: 0_i16,
27931 chan4_scaled: 0_i16,
27932 chan5_scaled: 0_i16,
27933 chan6_scaled: 0_i16,
27934 chan7_scaled: 0_i16,
27935 chan8_scaled: 0_i16,
27936 port: 0_u8,
27937 rssi: 0_u8,
27938 };
27939 #[cfg(feature = "arbitrary")]
27940 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27941 use arbitrary::{Arbitrary, Unstructured};
27942 let mut buf = [0u8; 1024];
27943 rng.fill_bytes(&mut buf);
27944 let mut unstructured = Unstructured::new(&buf);
27945 Self::arbitrary(&mut unstructured).unwrap_or_default()
27946 }
27947}
27948impl Default for RC_CHANNELS_SCALED_DATA {
27949 fn default() -> Self {
27950 Self::DEFAULT.clone()
27951 }
27952}
27953impl MessageData for RC_CHANNELS_SCALED_DATA {
27954 type Message = MavMessage;
27955 const ID: u32 = 34u32;
27956 const NAME: &'static str = "RC_CHANNELS_SCALED";
27957 const EXTRA_CRC: u8 = 237u8;
27958 const ENCODED_LEN: usize = 22usize;
27959 fn deser(
27960 _version: MavlinkVersion,
27961 __input: &[u8],
27962 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27963 let avail_len = __input.len();
27964 let mut payload_buf = [0; Self::ENCODED_LEN];
27965 let mut buf = if avail_len < Self::ENCODED_LEN {
27966 payload_buf[0..avail_len].copy_from_slice(__input);
27967 Bytes::new(&payload_buf)
27968 } else {
27969 Bytes::new(__input)
27970 };
27971 let mut __struct = Self::default();
27972 __struct.time_boot_ms = buf.get_u32_le()?;
27973 __struct.chan1_scaled = buf.get_i16_le()?;
27974 __struct.chan2_scaled = buf.get_i16_le()?;
27975 __struct.chan3_scaled = buf.get_i16_le()?;
27976 __struct.chan4_scaled = buf.get_i16_le()?;
27977 __struct.chan5_scaled = buf.get_i16_le()?;
27978 __struct.chan6_scaled = buf.get_i16_le()?;
27979 __struct.chan7_scaled = buf.get_i16_le()?;
27980 __struct.chan8_scaled = buf.get_i16_le()?;
27981 __struct.port = buf.get_u8()?;
27982 __struct.rssi = buf.get_u8()?;
27983 Ok(__struct)
27984 }
27985 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27986 let mut __tmp = BytesMut::new(bytes);
27987 #[allow(clippy::absurd_extreme_comparisons)]
27988 #[allow(unused_comparisons)]
27989 if __tmp.remaining() < Self::ENCODED_LEN {
27990 panic!(
27991 "buffer is too small (need {} bytes, but got {})",
27992 Self::ENCODED_LEN,
27993 __tmp.remaining(),
27994 )
27995 }
27996 __tmp.put_u32_le(self.time_boot_ms);
27997 __tmp.put_i16_le(self.chan1_scaled);
27998 __tmp.put_i16_le(self.chan2_scaled);
27999 __tmp.put_i16_le(self.chan3_scaled);
28000 __tmp.put_i16_le(self.chan4_scaled);
28001 __tmp.put_i16_le(self.chan5_scaled);
28002 __tmp.put_i16_le(self.chan6_scaled);
28003 __tmp.put_i16_le(self.chan7_scaled);
28004 __tmp.put_i16_le(self.chan8_scaled);
28005 __tmp.put_u8(self.port);
28006 __tmp.put_u8(self.rssi);
28007 if matches!(version, MavlinkVersion::V2) {
28008 let len = __tmp.len();
28009 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28010 } else {
28011 __tmp.len()
28012 }
28013 }
28014}
28015#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
28016#[doc = "Request a data stream."]
28017#[doc = ""]
28018#[doc = "ID: 66"]
28019#[derive(Debug, Clone, PartialEq)]
28020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28021#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28022#[cfg_attr(feature = "ts", derive(TS))]
28023#[cfg_attr(feature = "ts", ts(export))]
28024pub struct REQUEST_DATA_STREAM_DATA {
28025 #[doc = "The requested message rate"]
28026 pub req_message_rate: u16,
28027 #[doc = "The target requested to send the message stream."]
28028 pub target_system: u8,
28029 #[doc = "The target requested to send the message stream."]
28030 pub target_component: u8,
28031 #[doc = "The ID of the requested data stream"]
28032 pub req_stream_id: u8,
28033 #[doc = "1 to start sending, 0 to stop sending."]
28034 pub start_stop: u8,
28035}
28036impl REQUEST_DATA_STREAM_DATA {
28037 pub const ENCODED_LEN: usize = 6usize;
28038 pub const DEFAULT: Self = Self {
28039 req_message_rate: 0_u16,
28040 target_system: 0_u8,
28041 target_component: 0_u8,
28042 req_stream_id: 0_u8,
28043 start_stop: 0_u8,
28044 };
28045 #[cfg(feature = "arbitrary")]
28046 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28047 use arbitrary::{Arbitrary, Unstructured};
28048 let mut buf = [0u8; 1024];
28049 rng.fill_bytes(&mut buf);
28050 let mut unstructured = Unstructured::new(&buf);
28051 Self::arbitrary(&mut unstructured).unwrap_or_default()
28052 }
28053}
28054impl Default for REQUEST_DATA_STREAM_DATA {
28055 fn default() -> Self {
28056 Self::DEFAULT.clone()
28057 }
28058}
28059impl MessageData for REQUEST_DATA_STREAM_DATA {
28060 type Message = MavMessage;
28061 const ID: u32 = 66u32;
28062 const NAME: &'static str = "REQUEST_DATA_STREAM";
28063 const EXTRA_CRC: u8 = 148u8;
28064 const ENCODED_LEN: usize = 6usize;
28065 fn deser(
28066 _version: MavlinkVersion,
28067 __input: &[u8],
28068 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28069 let avail_len = __input.len();
28070 let mut payload_buf = [0; Self::ENCODED_LEN];
28071 let mut buf = if avail_len < Self::ENCODED_LEN {
28072 payload_buf[0..avail_len].copy_from_slice(__input);
28073 Bytes::new(&payload_buf)
28074 } else {
28075 Bytes::new(__input)
28076 };
28077 let mut __struct = Self::default();
28078 __struct.req_message_rate = buf.get_u16_le()?;
28079 __struct.target_system = buf.get_u8()?;
28080 __struct.target_component = buf.get_u8()?;
28081 __struct.req_stream_id = buf.get_u8()?;
28082 __struct.start_stop = buf.get_u8()?;
28083 Ok(__struct)
28084 }
28085 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28086 let mut __tmp = BytesMut::new(bytes);
28087 #[allow(clippy::absurd_extreme_comparisons)]
28088 #[allow(unused_comparisons)]
28089 if __tmp.remaining() < Self::ENCODED_LEN {
28090 panic!(
28091 "buffer is too small (need {} bytes, but got {})",
28092 Self::ENCODED_LEN,
28093 __tmp.remaining(),
28094 )
28095 }
28096 __tmp.put_u16_le(self.req_message_rate);
28097 __tmp.put_u8(self.target_system);
28098 __tmp.put_u8(self.target_component);
28099 __tmp.put_u8(self.req_stream_id);
28100 __tmp.put_u8(self.start_stop);
28101 if matches!(version, MavlinkVersion::V2) {
28102 let len = __tmp.len();
28103 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28104 } else {
28105 __tmp.len()
28106 }
28107 }
28108}
28109#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
28110#[doc = ""]
28111#[doc = "ID: 412"]
28112#[derive(Debug, Clone, PartialEq)]
28113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28115#[cfg_attr(feature = "ts", derive(TS))]
28116#[cfg_attr(feature = "ts", ts(export))]
28117pub struct REQUEST_EVENT_DATA {
28118 #[doc = "First sequence number of the requested event."]
28119 pub first_sequence: u16,
28120 #[doc = "Last sequence number of the requested event."]
28121 pub last_sequence: u16,
28122 #[doc = "System ID"]
28123 pub target_system: u8,
28124 #[doc = "Component ID"]
28125 pub target_component: u8,
28126}
28127impl REQUEST_EVENT_DATA {
28128 pub const ENCODED_LEN: usize = 6usize;
28129 pub const DEFAULT: Self = Self {
28130 first_sequence: 0_u16,
28131 last_sequence: 0_u16,
28132 target_system: 0_u8,
28133 target_component: 0_u8,
28134 };
28135 #[cfg(feature = "arbitrary")]
28136 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28137 use arbitrary::{Arbitrary, Unstructured};
28138 let mut buf = [0u8; 1024];
28139 rng.fill_bytes(&mut buf);
28140 let mut unstructured = Unstructured::new(&buf);
28141 Self::arbitrary(&mut unstructured).unwrap_or_default()
28142 }
28143}
28144impl Default for REQUEST_EVENT_DATA {
28145 fn default() -> Self {
28146 Self::DEFAULT.clone()
28147 }
28148}
28149impl MessageData for REQUEST_EVENT_DATA {
28150 type Message = MavMessage;
28151 const ID: u32 = 412u32;
28152 const NAME: &'static str = "REQUEST_EVENT";
28153 const EXTRA_CRC: u8 = 33u8;
28154 const ENCODED_LEN: usize = 6usize;
28155 fn deser(
28156 _version: MavlinkVersion,
28157 __input: &[u8],
28158 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28159 let avail_len = __input.len();
28160 let mut payload_buf = [0; Self::ENCODED_LEN];
28161 let mut buf = if avail_len < Self::ENCODED_LEN {
28162 payload_buf[0..avail_len].copy_from_slice(__input);
28163 Bytes::new(&payload_buf)
28164 } else {
28165 Bytes::new(__input)
28166 };
28167 let mut __struct = Self::default();
28168 __struct.first_sequence = buf.get_u16_le()?;
28169 __struct.last_sequence = buf.get_u16_le()?;
28170 __struct.target_system = buf.get_u8()?;
28171 __struct.target_component = buf.get_u8()?;
28172 Ok(__struct)
28173 }
28174 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28175 let mut __tmp = BytesMut::new(bytes);
28176 #[allow(clippy::absurd_extreme_comparisons)]
28177 #[allow(unused_comparisons)]
28178 if __tmp.remaining() < Self::ENCODED_LEN {
28179 panic!(
28180 "buffer is too small (need {} bytes, but got {})",
28181 Self::ENCODED_LEN,
28182 __tmp.remaining(),
28183 )
28184 }
28185 __tmp.put_u16_le(self.first_sequence);
28186 __tmp.put_u16_le(self.last_sequence);
28187 __tmp.put_u8(self.target_system);
28188 __tmp.put_u8(self.target_component);
28189 if matches!(version, MavlinkVersion::V2) {
28190 let len = __tmp.len();
28191 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28192 } else {
28193 __tmp.len()
28194 }
28195 }
28196}
28197#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
28198#[doc = ""]
28199#[doc = "ID: 142"]
28200#[derive(Debug, Clone, PartialEq)]
28201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28203#[cfg_attr(feature = "ts", derive(TS))]
28204#[cfg_attr(feature = "ts", ts(export))]
28205pub struct RESOURCE_REQUEST_DATA {
28206 #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
28207 pub request_id: u8,
28208 #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
28209 pub uri_type: u8,
28210 #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
28211 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28212 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28213 pub uri: [u8; 120],
28214 #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
28215 pub transfer_type: u8,
28216 #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
28217 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28218 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28219 pub storage: [u8; 120],
28220}
28221impl RESOURCE_REQUEST_DATA {
28222 pub const ENCODED_LEN: usize = 243usize;
28223 pub const DEFAULT: Self = Self {
28224 request_id: 0_u8,
28225 uri_type: 0_u8,
28226 uri: [0_u8; 120usize],
28227 transfer_type: 0_u8,
28228 storage: [0_u8; 120usize],
28229 };
28230 #[cfg(feature = "arbitrary")]
28231 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28232 use arbitrary::{Arbitrary, Unstructured};
28233 let mut buf = [0u8; 1024];
28234 rng.fill_bytes(&mut buf);
28235 let mut unstructured = Unstructured::new(&buf);
28236 Self::arbitrary(&mut unstructured).unwrap_or_default()
28237 }
28238}
28239impl Default for RESOURCE_REQUEST_DATA {
28240 fn default() -> Self {
28241 Self::DEFAULT.clone()
28242 }
28243}
28244impl MessageData for RESOURCE_REQUEST_DATA {
28245 type Message = MavMessage;
28246 const ID: u32 = 142u32;
28247 const NAME: &'static str = "RESOURCE_REQUEST";
28248 const EXTRA_CRC: u8 = 72u8;
28249 const ENCODED_LEN: usize = 243usize;
28250 fn deser(
28251 _version: MavlinkVersion,
28252 __input: &[u8],
28253 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28254 let avail_len = __input.len();
28255 let mut payload_buf = [0; Self::ENCODED_LEN];
28256 let mut buf = if avail_len < Self::ENCODED_LEN {
28257 payload_buf[0..avail_len].copy_from_slice(__input);
28258 Bytes::new(&payload_buf)
28259 } else {
28260 Bytes::new(__input)
28261 };
28262 let mut __struct = Self::default();
28263 __struct.request_id = buf.get_u8()?;
28264 __struct.uri_type = buf.get_u8()?;
28265 for v in &mut __struct.uri {
28266 let val = buf.get_u8()?;
28267 *v = val;
28268 }
28269 __struct.transfer_type = buf.get_u8()?;
28270 for v in &mut __struct.storage {
28271 let val = buf.get_u8()?;
28272 *v = val;
28273 }
28274 Ok(__struct)
28275 }
28276 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28277 let mut __tmp = BytesMut::new(bytes);
28278 #[allow(clippy::absurd_extreme_comparisons)]
28279 #[allow(unused_comparisons)]
28280 if __tmp.remaining() < Self::ENCODED_LEN {
28281 panic!(
28282 "buffer is too small (need {} bytes, but got {})",
28283 Self::ENCODED_LEN,
28284 __tmp.remaining(),
28285 )
28286 }
28287 __tmp.put_u8(self.request_id);
28288 __tmp.put_u8(self.uri_type);
28289 for val in &self.uri {
28290 __tmp.put_u8(*val);
28291 }
28292 __tmp.put_u8(self.transfer_type);
28293 for val in &self.storage {
28294 __tmp.put_u8(*val);
28295 }
28296 if matches!(version, MavlinkVersion::V2) {
28297 let len = __tmp.len();
28298 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28299 } else {
28300 __tmp.len()
28301 }
28302 }
28303}
28304#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
28305#[doc = ""]
28306#[doc = "ID: 413"]
28307#[derive(Debug, Clone, PartialEq)]
28308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28310#[cfg_attr(feature = "ts", derive(TS))]
28311#[cfg_attr(feature = "ts", ts(export))]
28312pub struct RESPONSE_EVENT_ERROR_DATA {
28313 #[doc = "Sequence number."]
28314 pub sequence: u16,
28315 #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
28316 pub sequence_oldest_available: u16,
28317 #[doc = "System ID"]
28318 pub target_system: u8,
28319 #[doc = "Component ID"]
28320 pub target_component: u8,
28321 #[doc = "Error reason."]
28322 pub reason: MavEventErrorReason,
28323}
28324impl RESPONSE_EVENT_ERROR_DATA {
28325 pub const ENCODED_LEN: usize = 7usize;
28326 pub const DEFAULT: Self = Self {
28327 sequence: 0_u16,
28328 sequence_oldest_available: 0_u16,
28329 target_system: 0_u8,
28330 target_component: 0_u8,
28331 reason: MavEventErrorReason::DEFAULT,
28332 };
28333 #[cfg(feature = "arbitrary")]
28334 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28335 use arbitrary::{Arbitrary, Unstructured};
28336 let mut buf = [0u8; 1024];
28337 rng.fill_bytes(&mut buf);
28338 let mut unstructured = Unstructured::new(&buf);
28339 Self::arbitrary(&mut unstructured).unwrap_or_default()
28340 }
28341}
28342impl Default for RESPONSE_EVENT_ERROR_DATA {
28343 fn default() -> Self {
28344 Self::DEFAULT.clone()
28345 }
28346}
28347impl MessageData for RESPONSE_EVENT_ERROR_DATA {
28348 type Message = MavMessage;
28349 const ID: u32 = 413u32;
28350 const NAME: &'static str = "RESPONSE_EVENT_ERROR";
28351 const EXTRA_CRC: u8 = 77u8;
28352 const ENCODED_LEN: usize = 7usize;
28353 fn deser(
28354 _version: MavlinkVersion,
28355 __input: &[u8],
28356 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28357 let avail_len = __input.len();
28358 let mut payload_buf = [0; Self::ENCODED_LEN];
28359 let mut buf = if avail_len < Self::ENCODED_LEN {
28360 payload_buf[0..avail_len].copy_from_slice(__input);
28361 Bytes::new(&payload_buf)
28362 } else {
28363 Bytes::new(__input)
28364 };
28365 let mut __struct = Self::default();
28366 __struct.sequence = buf.get_u16_le()?;
28367 __struct.sequence_oldest_available = buf.get_u16_le()?;
28368 __struct.target_system = buf.get_u8()?;
28369 __struct.target_component = buf.get_u8()?;
28370 let tmp = buf.get_u8()?;
28371 __struct.reason =
28372 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28373 enum_type: "MavEventErrorReason",
28374 value: tmp as u64,
28375 })?;
28376 Ok(__struct)
28377 }
28378 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28379 let mut __tmp = BytesMut::new(bytes);
28380 #[allow(clippy::absurd_extreme_comparisons)]
28381 #[allow(unused_comparisons)]
28382 if __tmp.remaining() < Self::ENCODED_LEN {
28383 panic!(
28384 "buffer is too small (need {} bytes, but got {})",
28385 Self::ENCODED_LEN,
28386 __tmp.remaining(),
28387 )
28388 }
28389 __tmp.put_u16_le(self.sequence);
28390 __tmp.put_u16_le(self.sequence_oldest_available);
28391 __tmp.put_u8(self.target_system);
28392 __tmp.put_u8(self.target_component);
28393 __tmp.put_u8(self.reason as u8);
28394 if matches!(version, MavlinkVersion::V2) {
28395 let len = __tmp.len();
28396 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28397 } else {
28398 __tmp.len()
28399 }
28400 }
28401}
28402#[doc = "Read out the safety zone the MAV currently assumes."]
28403#[doc = ""]
28404#[doc = "ID: 55"]
28405#[derive(Debug, Clone, PartialEq)]
28406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28408#[cfg_attr(feature = "ts", derive(TS))]
28409#[cfg_attr(feature = "ts", ts(export))]
28410pub struct SAFETY_ALLOWED_AREA_DATA {
28411 #[doc = "x position 1 / Latitude 1"]
28412 pub p1x: f32,
28413 #[doc = "y position 1 / Longitude 1"]
28414 pub p1y: f32,
28415 #[doc = "z position 1 / Altitude 1"]
28416 pub p1z: f32,
28417 #[doc = "x position 2 / Latitude 2"]
28418 pub p2x: f32,
28419 #[doc = "y position 2 / Longitude 2"]
28420 pub p2y: f32,
28421 #[doc = "z position 2 / Altitude 2"]
28422 pub p2z: f32,
28423 #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
28424 pub frame: MavFrame,
28425}
28426impl SAFETY_ALLOWED_AREA_DATA {
28427 pub const ENCODED_LEN: usize = 25usize;
28428 pub const DEFAULT: Self = Self {
28429 p1x: 0.0_f32,
28430 p1y: 0.0_f32,
28431 p1z: 0.0_f32,
28432 p2x: 0.0_f32,
28433 p2y: 0.0_f32,
28434 p2z: 0.0_f32,
28435 frame: MavFrame::DEFAULT,
28436 };
28437 #[cfg(feature = "arbitrary")]
28438 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28439 use arbitrary::{Arbitrary, Unstructured};
28440 let mut buf = [0u8; 1024];
28441 rng.fill_bytes(&mut buf);
28442 let mut unstructured = Unstructured::new(&buf);
28443 Self::arbitrary(&mut unstructured).unwrap_or_default()
28444 }
28445}
28446impl Default for SAFETY_ALLOWED_AREA_DATA {
28447 fn default() -> Self {
28448 Self::DEFAULT.clone()
28449 }
28450}
28451impl MessageData for SAFETY_ALLOWED_AREA_DATA {
28452 type Message = MavMessage;
28453 const ID: u32 = 55u32;
28454 const NAME: &'static str = "SAFETY_ALLOWED_AREA";
28455 const EXTRA_CRC: u8 = 3u8;
28456 const ENCODED_LEN: usize = 25usize;
28457 fn deser(
28458 _version: MavlinkVersion,
28459 __input: &[u8],
28460 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28461 let avail_len = __input.len();
28462 let mut payload_buf = [0; Self::ENCODED_LEN];
28463 let mut buf = if avail_len < Self::ENCODED_LEN {
28464 payload_buf[0..avail_len].copy_from_slice(__input);
28465 Bytes::new(&payload_buf)
28466 } else {
28467 Bytes::new(__input)
28468 };
28469 let mut __struct = Self::default();
28470 __struct.p1x = buf.get_f32_le()?;
28471 __struct.p1y = buf.get_f32_le()?;
28472 __struct.p1z = buf.get_f32_le()?;
28473 __struct.p2x = buf.get_f32_le()?;
28474 __struct.p2y = buf.get_f32_le()?;
28475 __struct.p2z = buf.get_f32_le()?;
28476 let tmp = buf.get_u8()?;
28477 __struct.frame =
28478 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28479 enum_type: "MavFrame",
28480 value: tmp as u64,
28481 })?;
28482 Ok(__struct)
28483 }
28484 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28485 let mut __tmp = BytesMut::new(bytes);
28486 #[allow(clippy::absurd_extreme_comparisons)]
28487 #[allow(unused_comparisons)]
28488 if __tmp.remaining() < Self::ENCODED_LEN {
28489 panic!(
28490 "buffer is too small (need {} bytes, but got {})",
28491 Self::ENCODED_LEN,
28492 __tmp.remaining(),
28493 )
28494 }
28495 __tmp.put_f32_le(self.p1x);
28496 __tmp.put_f32_le(self.p1y);
28497 __tmp.put_f32_le(self.p1z);
28498 __tmp.put_f32_le(self.p2x);
28499 __tmp.put_f32_le(self.p2y);
28500 __tmp.put_f32_le(self.p2z);
28501 __tmp.put_u8(self.frame as u8);
28502 if matches!(version, MavlinkVersion::V2) {
28503 let len = __tmp.len();
28504 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28505 } else {
28506 __tmp.len()
28507 }
28508 }
28509}
28510#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
28511#[doc = ""]
28512#[doc = "ID: 54"]
28513#[derive(Debug, Clone, PartialEq)]
28514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28516#[cfg_attr(feature = "ts", derive(TS))]
28517#[cfg_attr(feature = "ts", ts(export))]
28518pub struct SAFETY_SET_ALLOWED_AREA_DATA {
28519 #[doc = "x position 1 / Latitude 1"]
28520 pub p1x: f32,
28521 #[doc = "y position 1 / Longitude 1"]
28522 pub p1y: f32,
28523 #[doc = "z position 1 / Altitude 1"]
28524 pub p1z: f32,
28525 #[doc = "x position 2 / Latitude 2"]
28526 pub p2x: f32,
28527 #[doc = "y position 2 / Longitude 2"]
28528 pub p2y: f32,
28529 #[doc = "z position 2 / Altitude 2"]
28530 pub p2z: f32,
28531 #[doc = "System ID"]
28532 pub target_system: u8,
28533 #[doc = "Component ID"]
28534 pub target_component: u8,
28535 #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
28536 pub frame: MavFrame,
28537}
28538impl SAFETY_SET_ALLOWED_AREA_DATA {
28539 pub const ENCODED_LEN: usize = 27usize;
28540 pub const DEFAULT: Self = Self {
28541 p1x: 0.0_f32,
28542 p1y: 0.0_f32,
28543 p1z: 0.0_f32,
28544 p2x: 0.0_f32,
28545 p2y: 0.0_f32,
28546 p2z: 0.0_f32,
28547 target_system: 0_u8,
28548 target_component: 0_u8,
28549 frame: MavFrame::DEFAULT,
28550 };
28551 #[cfg(feature = "arbitrary")]
28552 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28553 use arbitrary::{Arbitrary, Unstructured};
28554 let mut buf = [0u8; 1024];
28555 rng.fill_bytes(&mut buf);
28556 let mut unstructured = Unstructured::new(&buf);
28557 Self::arbitrary(&mut unstructured).unwrap_or_default()
28558 }
28559}
28560impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
28561 fn default() -> Self {
28562 Self::DEFAULT.clone()
28563 }
28564}
28565impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
28566 type Message = MavMessage;
28567 const ID: u32 = 54u32;
28568 const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
28569 const EXTRA_CRC: u8 = 15u8;
28570 const ENCODED_LEN: usize = 27usize;
28571 fn deser(
28572 _version: MavlinkVersion,
28573 __input: &[u8],
28574 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28575 let avail_len = __input.len();
28576 let mut payload_buf = [0; Self::ENCODED_LEN];
28577 let mut buf = if avail_len < Self::ENCODED_LEN {
28578 payload_buf[0..avail_len].copy_from_slice(__input);
28579 Bytes::new(&payload_buf)
28580 } else {
28581 Bytes::new(__input)
28582 };
28583 let mut __struct = Self::default();
28584 __struct.p1x = buf.get_f32_le()?;
28585 __struct.p1y = buf.get_f32_le()?;
28586 __struct.p1z = buf.get_f32_le()?;
28587 __struct.p2x = buf.get_f32_le()?;
28588 __struct.p2y = buf.get_f32_le()?;
28589 __struct.p2z = buf.get_f32_le()?;
28590 __struct.target_system = buf.get_u8()?;
28591 __struct.target_component = buf.get_u8()?;
28592 let tmp = buf.get_u8()?;
28593 __struct.frame =
28594 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28595 enum_type: "MavFrame",
28596 value: tmp as u64,
28597 })?;
28598 Ok(__struct)
28599 }
28600 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28601 let mut __tmp = BytesMut::new(bytes);
28602 #[allow(clippy::absurd_extreme_comparisons)]
28603 #[allow(unused_comparisons)]
28604 if __tmp.remaining() < Self::ENCODED_LEN {
28605 panic!(
28606 "buffer is too small (need {} bytes, but got {})",
28607 Self::ENCODED_LEN,
28608 __tmp.remaining(),
28609 )
28610 }
28611 __tmp.put_f32_le(self.p1x);
28612 __tmp.put_f32_le(self.p1y);
28613 __tmp.put_f32_le(self.p1z);
28614 __tmp.put_f32_le(self.p2x);
28615 __tmp.put_f32_le(self.p2y);
28616 __tmp.put_f32_le(self.p2z);
28617 __tmp.put_u8(self.target_system);
28618 __tmp.put_u8(self.target_component);
28619 __tmp.put_u8(self.frame as u8);
28620 if matches!(version, MavlinkVersion::V2) {
28621 let len = __tmp.len();
28622 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28623 } else {
28624 __tmp.len()
28625 }
28626 }
28627}
28628#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
28629#[doc = ""]
28630#[doc = "ID: 26"]
28631#[derive(Debug, Clone, PartialEq)]
28632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28634#[cfg_attr(feature = "ts", derive(TS))]
28635#[cfg_attr(feature = "ts", ts(export))]
28636pub struct SCALED_IMU_DATA {
28637 #[doc = "Timestamp (time since system boot)."]
28638 pub time_boot_ms: u32,
28639 #[doc = "X acceleration"]
28640 pub xacc: i16,
28641 #[doc = "Y acceleration"]
28642 pub yacc: i16,
28643 #[doc = "Z acceleration"]
28644 pub zacc: i16,
28645 #[doc = "Angular speed around X axis"]
28646 pub xgyro: i16,
28647 #[doc = "Angular speed around Y axis"]
28648 pub ygyro: i16,
28649 #[doc = "Angular speed around Z axis"]
28650 pub zgyro: i16,
28651 #[doc = "X Magnetic field"]
28652 pub xmag: i16,
28653 #[doc = "Y Magnetic field"]
28654 pub ymag: i16,
28655 #[doc = "Z Magnetic field"]
28656 pub zmag: i16,
28657 #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28658 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28659 pub temperature: i16,
28660}
28661impl SCALED_IMU_DATA {
28662 pub const ENCODED_LEN: usize = 24usize;
28663 pub const DEFAULT: Self = Self {
28664 time_boot_ms: 0_u32,
28665 xacc: 0_i16,
28666 yacc: 0_i16,
28667 zacc: 0_i16,
28668 xgyro: 0_i16,
28669 ygyro: 0_i16,
28670 zgyro: 0_i16,
28671 xmag: 0_i16,
28672 ymag: 0_i16,
28673 zmag: 0_i16,
28674 temperature: 0_i16,
28675 };
28676 #[cfg(feature = "arbitrary")]
28677 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28678 use arbitrary::{Arbitrary, Unstructured};
28679 let mut buf = [0u8; 1024];
28680 rng.fill_bytes(&mut buf);
28681 let mut unstructured = Unstructured::new(&buf);
28682 Self::arbitrary(&mut unstructured).unwrap_or_default()
28683 }
28684}
28685impl Default for SCALED_IMU_DATA {
28686 fn default() -> Self {
28687 Self::DEFAULT.clone()
28688 }
28689}
28690impl MessageData for SCALED_IMU_DATA {
28691 type Message = MavMessage;
28692 const ID: u32 = 26u32;
28693 const NAME: &'static str = "SCALED_IMU";
28694 const EXTRA_CRC: u8 = 170u8;
28695 const ENCODED_LEN: usize = 24usize;
28696 fn deser(
28697 _version: MavlinkVersion,
28698 __input: &[u8],
28699 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28700 let avail_len = __input.len();
28701 let mut payload_buf = [0; Self::ENCODED_LEN];
28702 let mut buf = if avail_len < Self::ENCODED_LEN {
28703 payload_buf[0..avail_len].copy_from_slice(__input);
28704 Bytes::new(&payload_buf)
28705 } else {
28706 Bytes::new(__input)
28707 };
28708 let mut __struct = Self::default();
28709 __struct.time_boot_ms = buf.get_u32_le()?;
28710 __struct.xacc = buf.get_i16_le()?;
28711 __struct.yacc = buf.get_i16_le()?;
28712 __struct.zacc = buf.get_i16_le()?;
28713 __struct.xgyro = buf.get_i16_le()?;
28714 __struct.ygyro = buf.get_i16_le()?;
28715 __struct.zgyro = buf.get_i16_le()?;
28716 __struct.xmag = buf.get_i16_le()?;
28717 __struct.ymag = buf.get_i16_le()?;
28718 __struct.zmag = buf.get_i16_le()?;
28719 __struct.temperature = buf.get_i16_le()?;
28720 Ok(__struct)
28721 }
28722 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28723 let mut __tmp = BytesMut::new(bytes);
28724 #[allow(clippy::absurd_extreme_comparisons)]
28725 #[allow(unused_comparisons)]
28726 if __tmp.remaining() < Self::ENCODED_LEN {
28727 panic!(
28728 "buffer is too small (need {} bytes, but got {})",
28729 Self::ENCODED_LEN,
28730 __tmp.remaining(),
28731 )
28732 }
28733 __tmp.put_u32_le(self.time_boot_ms);
28734 __tmp.put_i16_le(self.xacc);
28735 __tmp.put_i16_le(self.yacc);
28736 __tmp.put_i16_le(self.zacc);
28737 __tmp.put_i16_le(self.xgyro);
28738 __tmp.put_i16_le(self.ygyro);
28739 __tmp.put_i16_le(self.zgyro);
28740 __tmp.put_i16_le(self.xmag);
28741 __tmp.put_i16_le(self.ymag);
28742 __tmp.put_i16_le(self.zmag);
28743 if matches!(version, MavlinkVersion::V2) {
28744 __tmp.put_i16_le(self.temperature);
28745 let len = __tmp.len();
28746 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28747 } else {
28748 __tmp.len()
28749 }
28750 }
28751}
28752#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
28753#[doc = ""]
28754#[doc = "ID: 116"]
28755#[derive(Debug, Clone, PartialEq)]
28756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28758#[cfg_attr(feature = "ts", derive(TS))]
28759#[cfg_attr(feature = "ts", ts(export))]
28760pub struct SCALED_IMU2_DATA {
28761 #[doc = "Timestamp (time since system boot)."]
28762 pub time_boot_ms: u32,
28763 #[doc = "X acceleration"]
28764 pub xacc: i16,
28765 #[doc = "Y acceleration"]
28766 pub yacc: i16,
28767 #[doc = "Z acceleration"]
28768 pub zacc: i16,
28769 #[doc = "Angular speed around X axis"]
28770 pub xgyro: i16,
28771 #[doc = "Angular speed around Y axis"]
28772 pub ygyro: i16,
28773 #[doc = "Angular speed around Z axis"]
28774 pub zgyro: i16,
28775 #[doc = "X Magnetic field"]
28776 pub xmag: i16,
28777 #[doc = "Y Magnetic field"]
28778 pub ymag: i16,
28779 #[doc = "Z Magnetic field"]
28780 pub zmag: i16,
28781 #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28782 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28783 pub temperature: i16,
28784}
28785impl SCALED_IMU2_DATA {
28786 pub const ENCODED_LEN: usize = 24usize;
28787 pub const DEFAULT: Self = Self {
28788 time_boot_ms: 0_u32,
28789 xacc: 0_i16,
28790 yacc: 0_i16,
28791 zacc: 0_i16,
28792 xgyro: 0_i16,
28793 ygyro: 0_i16,
28794 zgyro: 0_i16,
28795 xmag: 0_i16,
28796 ymag: 0_i16,
28797 zmag: 0_i16,
28798 temperature: 0_i16,
28799 };
28800 #[cfg(feature = "arbitrary")]
28801 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28802 use arbitrary::{Arbitrary, Unstructured};
28803 let mut buf = [0u8; 1024];
28804 rng.fill_bytes(&mut buf);
28805 let mut unstructured = Unstructured::new(&buf);
28806 Self::arbitrary(&mut unstructured).unwrap_or_default()
28807 }
28808}
28809impl Default for SCALED_IMU2_DATA {
28810 fn default() -> Self {
28811 Self::DEFAULT.clone()
28812 }
28813}
28814impl MessageData for SCALED_IMU2_DATA {
28815 type Message = MavMessage;
28816 const ID: u32 = 116u32;
28817 const NAME: &'static str = "SCALED_IMU2";
28818 const EXTRA_CRC: u8 = 76u8;
28819 const ENCODED_LEN: usize = 24usize;
28820 fn deser(
28821 _version: MavlinkVersion,
28822 __input: &[u8],
28823 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28824 let avail_len = __input.len();
28825 let mut payload_buf = [0; Self::ENCODED_LEN];
28826 let mut buf = if avail_len < Self::ENCODED_LEN {
28827 payload_buf[0..avail_len].copy_from_slice(__input);
28828 Bytes::new(&payload_buf)
28829 } else {
28830 Bytes::new(__input)
28831 };
28832 let mut __struct = Self::default();
28833 __struct.time_boot_ms = buf.get_u32_le()?;
28834 __struct.xacc = buf.get_i16_le()?;
28835 __struct.yacc = buf.get_i16_le()?;
28836 __struct.zacc = buf.get_i16_le()?;
28837 __struct.xgyro = buf.get_i16_le()?;
28838 __struct.ygyro = buf.get_i16_le()?;
28839 __struct.zgyro = buf.get_i16_le()?;
28840 __struct.xmag = buf.get_i16_le()?;
28841 __struct.ymag = buf.get_i16_le()?;
28842 __struct.zmag = buf.get_i16_le()?;
28843 __struct.temperature = buf.get_i16_le()?;
28844 Ok(__struct)
28845 }
28846 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28847 let mut __tmp = BytesMut::new(bytes);
28848 #[allow(clippy::absurd_extreme_comparisons)]
28849 #[allow(unused_comparisons)]
28850 if __tmp.remaining() < Self::ENCODED_LEN {
28851 panic!(
28852 "buffer is too small (need {} bytes, but got {})",
28853 Self::ENCODED_LEN,
28854 __tmp.remaining(),
28855 )
28856 }
28857 __tmp.put_u32_le(self.time_boot_ms);
28858 __tmp.put_i16_le(self.xacc);
28859 __tmp.put_i16_le(self.yacc);
28860 __tmp.put_i16_le(self.zacc);
28861 __tmp.put_i16_le(self.xgyro);
28862 __tmp.put_i16_le(self.ygyro);
28863 __tmp.put_i16_le(self.zgyro);
28864 __tmp.put_i16_le(self.xmag);
28865 __tmp.put_i16_le(self.ymag);
28866 __tmp.put_i16_le(self.zmag);
28867 if matches!(version, MavlinkVersion::V2) {
28868 __tmp.put_i16_le(self.temperature);
28869 let len = __tmp.len();
28870 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28871 } else {
28872 __tmp.len()
28873 }
28874 }
28875}
28876#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
28877#[doc = ""]
28878#[doc = "ID: 129"]
28879#[derive(Debug, Clone, PartialEq)]
28880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28882#[cfg_attr(feature = "ts", derive(TS))]
28883#[cfg_attr(feature = "ts", ts(export))]
28884pub struct SCALED_IMU3_DATA {
28885 #[doc = "Timestamp (time since system boot)."]
28886 pub time_boot_ms: u32,
28887 #[doc = "X acceleration"]
28888 pub xacc: i16,
28889 #[doc = "Y acceleration"]
28890 pub yacc: i16,
28891 #[doc = "Z acceleration"]
28892 pub zacc: i16,
28893 #[doc = "Angular speed around X axis"]
28894 pub xgyro: i16,
28895 #[doc = "Angular speed around Y axis"]
28896 pub ygyro: i16,
28897 #[doc = "Angular speed around Z axis"]
28898 pub zgyro: i16,
28899 #[doc = "X Magnetic field"]
28900 pub xmag: i16,
28901 #[doc = "Y Magnetic field"]
28902 pub ymag: i16,
28903 #[doc = "Z Magnetic field"]
28904 pub zmag: i16,
28905 #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28906 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28907 pub temperature: i16,
28908}
28909impl SCALED_IMU3_DATA {
28910 pub const ENCODED_LEN: usize = 24usize;
28911 pub const DEFAULT: Self = Self {
28912 time_boot_ms: 0_u32,
28913 xacc: 0_i16,
28914 yacc: 0_i16,
28915 zacc: 0_i16,
28916 xgyro: 0_i16,
28917 ygyro: 0_i16,
28918 zgyro: 0_i16,
28919 xmag: 0_i16,
28920 ymag: 0_i16,
28921 zmag: 0_i16,
28922 temperature: 0_i16,
28923 };
28924 #[cfg(feature = "arbitrary")]
28925 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28926 use arbitrary::{Arbitrary, Unstructured};
28927 let mut buf = [0u8; 1024];
28928 rng.fill_bytes(&mut buf);
28929 let mut unstructured = Unstructured::new(&buf);
28930 Self::arbitrary(&mut unstructured).unwrap_or_default()
28931 }
28932}
28933impl Default for SCALED_IMU3_DATA {
28934 fn default() -> Self {
28935 Self::DEFAULT.clone()
28936 }
28937}
28938impl MessageData for SCALED_IMU3_DATA {
28939 type Message = MavMessage;
28940 const ID: u32 = 129u32;
28941 const NAME: &'static str = "SCALED_IMU3";
28942 const EXTRA_CRC: u8 = 46u8;
28943 const ENCODED_LEN: usize = 24usize;
28944 fn deser(
28945 _version: MavlinkVersion,
28946 __input: &[u8],
28947 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28948 let avail_len = __input.len();
28949 let mut payload_buf = [0; Self::ENCODED_LEN];
28950 let mut buf = if avail_len < Self::ENCODED_LEN {
28951 payload_buf[0..avail_len].copy_from_slice(__input);
28952 Bytes::new(&payload_buf)
28953 } else {
28954 Bytes::new(__input)
28955 };
28956 let mut __struct = Self::default();
28957 __struct.time_boot_ms = buf.get_u32_le()?;
28958 __struct.xacc = buf.get_i16_le()?;
28959 __struct.yacc = buf.get_i16_le()?;
28960 __struct.zacc = buf.get_i16_le()?;
28961 __struct.xgyro = buf.get_i16_le()?;
28962 __struct.ygyro = buf.get_i16_le()?;
28963 __struct.zgyro = buf.get_i16_le()?;
28964 __struct.xmag = buf.get_i16_le()?;
28965 __struct.ymag = buf.get_i16_le()?;
28966 __struct.zmag = buf.get_i16_le()?;
28967 __struct.temperature = buf.get_i16_le()?;
28968 Ok(__struct)
28969 }
28970 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28971 let mut __tmp = BytesMut::new(bytes);
28972 #[allow(clippy::absurd_extreme_comparisons)]
28973 #[allow(unused_comparisons)]
28974 if __tmp.remaining() < Self::ENCODED_LEN {
28975 panic!(
28976 "buffer is too small (need {} bytes, but got {})",
28977 Self::ENCODED_LEN,
28978 __tmp.remaining(),
28979 )
28980 }
28981 __tmp.put_u32_le(self.time_boot_ms);
28982 __tmp.put_i16_le(self.xacc);
28983 __tmp.put_i16_le(self.yacc);
28984 __tmp.put_i16_le(self.zacc);
28985 __tmp.put_i16_le(self.xgyro);
28986 __tmp.put_i16_le(self.ygyro);
28987 __tmp.put_i16_le(self.zgyro);
28988 __tmp.put_i16_le(self.xmag);
28989 __tmp.put_i16_le(self.ymag);
28990 __tmp.put_i16_le(self.zmag);
28991 if matches!(version, MavlinkVersion::V2) {
28992 __tmp.put_i16_le(self.temperature);
28993 let len = __tmp.len();
28994 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28995 } else {
28996 __tmp.len()
28997 }
28998 }
28999}
29000#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
29001#[doc = ""]
29002#[doc = "ID: 29"]
29003#[derive(Debug, Clone, PartialEq)]
29004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29006#[cfg_attr(feature = "ts", derive(TS))]
29007#[cfg_attr(feature = "ts", ts(export))]
29008pub struct SCALED_PRESSURE_DATA {
29009 #[doc = "Timestamp (time since system boot)."]
29010 pub time_boot_ms: u32,
29011 #[doc = "Absolute pressure"]
29012 pub press_abs: f32,
29013 #[doc = "Differential pressure 1"]
29014 pub press_diff: f32,
29015 #[doc = "Absolute pressure temperature"]
29016 pub temperature: i16,
29017 #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29018 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29019 pub temperature_press_diff: i16,
29020}
29021impl SCALED_PRESSURE_DATA {
29022 pub const ENCODED_LEN: usize = 16usize;
29023 pub const DEFAULT: Self = Self {
29024 time_boot_ms: 0_u32,
29025 press_abs: 0.0_f32,
29026 press_diff: 0.0_f32,
29027 temperature: 0_i16,
29028 temperature_press_diff: 0_i16,
29029 };
29030 #[cfg(feature = "arbitrary")]
29031 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29032 use arbitrary::{Arbitrary, Unstructured};
29033 let mut buf = [0u8; 1024];
29034 rng.fill_bytes(&mut buf);
29035 let mut unstructured = Unstructured::new(&buf);
29036 Self::arbitrary(&mut unstructured).unwrap_or_default()
29037 }
29038}
29039impl Default for SCALED_PRESSURE_DATA {
29040 fn default() -> Self {
29041 Self::DEFAULT.clone()
29042 }
29043}
29044impl MessageData for SCALED_PRESSURE_DATA {
29045 type Message = MavMessage;
29046 const ID: u32 = 29u32;
29047 const NAME: &'static str = "SCALED_PRESSURE";
29048 const EXTRA_CRC: u8 = 115u8;
29049 const ENCODED_LEN: usize = 16usize;
29050 fn deser(
29051 _version: MavlinkVersion,
29052 __input: &[u8],
29053 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29054 let avail_len = __input.len();
29055 let mut payload_buf = [0; Self::ENCODED_LEN];
29056 let mut buf = if avail_len < Self::ENCODED_LEN {
29057 payload_buf[0..avail_len].copy_from_slice(__input);
29058 Bytes::new(&payload_buf)
29059 } else {
29060 Bytes::new(__input)
29061 };
29062 let mut __struct = Self::default();
29063 __struct.time_boot_ms = buf.get_u32_le()?;
29064 __struct.press_abs = buf.get_f32_le()?;
29065 __struct.press_diff = buf.get_f32_le()?;
29066 __struct.temperature = buf.get_i16_le()?;
29067 __struct.temperature_press_diff = buf.get_i16_le()?;
29068 Ok(__struct)
29069 }
29070 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29071 let mut __tmp = BytesMut::new(bytes);
29072 #[allow(clippy::absurd_extreme_comparisons)]
29073 #[allow(unused_comparisons)]
29074 if __tmp.remaining() < Self::ENCODED_LEN {
29075 panic!(
29076 "buffer is too small (need {} bytes, but got {})",
29077 Self::ENCODED_LEN,
29078 __tmp.remaining(),
29079 )
29080 }
29081 __tmp.put_u32_le(self.time_boot_ms);
29082 __tmp.put_f32_le(self.press_abs);
29083 __tmp.put_f32_le(self.press_diff);
29084 __tmp.put_i16_le(self.temperature);
29085 if matches!(version, MavlinkVersion::V2) {
29086 __tmp.put_i16_le(self.temperature_press_diff);
29087 let len = __tmp.len();
29088 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29089 } else {
29090 __tmp.len()
29091 }
29092 }
29093}
29094#[doc = "Barometer readings for 2nd barometer."]
29095#[doc = ""]
29096#[doc = "ID: 137"]
29097#[derive(Debug, Clone, PartialEq)]
29098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29100#[cfg_attr(feature = "ts", derive(TS))]
29101#[cfg_attr(feature = "ts", ts(export))]
29102pub struct SCALED_PRESSURE2_DATA {
29103 #[doc = "Timestamp (time since system boot)."]
29104 pub time_boot_ms: u32,
29105 #[doc = "Absolute pressure"]
29106 pub press_abs: f32,
29107 #[doc = "Differential pressure"]
29108 pub press_diff: f32,
29109 #[doc = "Absolute pressure temperature"]
29110 pub temperature: i16,
29111 #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29112 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29113 pub temperature_press_diff: i16,
29114}
29115impl SCALED_PRESSURE2_DATA {
29116 pub const ENCODED_LEN: usize = 16usize;
29117 pub const DEFAULT: Self = Self {
29118 time_boot_ms: 0_u32,
29119 press_abs: 0.0_f32,
29120 press_diff: 0.0_f32,
29121 temperature: 0_i16,
29122 temperature_press_diff: 0_i16,
29123 };
29124 #[cfg(feature = "arbitrary")]
29125 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29126 use arbitrary::{Arbitrary, Unstructured};
29127 let mut buf = [0u8; 1024];
29128 rng.fill_bytes(&mut buf);
29129 let mut unstructured = Unstructured::new(&buf);
29130 Self::arbitrary(&mut unstructured).unwrap_or_default()
29131 }
29132}
29133impl Default for SCALED_PRESSURE2_DATA {
29134 fn default() -> Self {
29135 Self::DEFAULT.clone()
29136 }
29137}
29138impl MessageData for SCALED_PRESSURE2_DATA {
29139 type Message = MavMessage;
29140 const ID: u32 = 137u32;
29141 const NAME: &'static str = "SCALED_PRESSURE2";
29142 const EXTRA_CRC: u8 = 195u8;
29143 const ENCODED_LEN: usize = 16usize;
29144 fn deser(
29145 _version: MavlinkVersion,
29146 __input: &[u8],
29147 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29148 let avail_len = __input.len();
29149 let mut payload_buf = [0; Self::ENCODED_LEN];
29150 let mut buf = if avail_len < Self::ENCODED_LEN {
29151 payload_buf[0..avail_len].copy_from_slice(__input);
29152 Bytes::new(&payload_buf)
29153 } else {
29154 Bytes::new(__input)
29155 };
29156 let mut __struct = Self::default();
29157 __struct.time_boot_ms = buf.get_u32_le()?;
29158 __struct.press_abs = buf.get_f32_le()?;
29159 __struct.press_diff = buf.get_f32_le()?;
29160 __struct.temperature = buf.get_i16_le()?;
29161 __struct.temperature_press_diff = buf.get_i16_le()?;
29162 Ok(__struct)
29163 }
29164 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29165 let mut __tmp = BytesMut::new(bytes);
29166 #[allow(clippy::absurd_extreme_comparisons)]
29167 #[allow(unused_comparisons)]
29168 if __tmp.remaining() < Self::ENCODED_LEN {
29169 panic!(
29170 "buffer is too small (need {} bytes, but got {})",
29171 Self::ENCODED_LEN,
29172 __tmp.remaining(),
29173 )
29174 }
29175 __tmp.put_u32_le(self.time_boot_ms);
29176 __tmp.put_f32_le(self.press_abs);
29177 __tmp.put_f32_le(self.press_diff);
29178 __tmp.put_i16_le(self.temperature);
29179 if matches!(version, MavlinkVersion::V2) {
29180 __tmp.put_i16_le(self.temperature_press_diff);
29181 let len = __tmp.len();
29182 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29183 } else {
29184 __tmp.len()
29185 }
29186 }
29187}
29188#[doc = "Barometer readings for 3rd barometer."]
29189#[doc = ""]
29190#[doc = "ID: 143"]
29191#[derive(Debug, Clone, PartialEq)]
29192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29194#[cfg_attr(feature = "ts", derive(TS))]
29195#[cfg_attr(feature = "ts", ts(export))]
29196pub struct SCALED_PRESSURE3_DATA {
29197 #[doc = "Timestamp (time since system boot)."]
29198 pub time_boot_ms: u32,
29199 #[doc = "Absolute pressure"]
29200 pub press_abs: f32,
29201 #[doc = "Differential pressure"]
29202 pub press_diff: f32,
29203 #[doc = "Absolute pressure temperature"]
29204 pub temperature: i16,
29205 #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29206 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29207 pub temperature_press_diff: i16,
29208}
29209impl SCALED_PRESSURE3_DATA {
29210 pub const ENCODED_LEN: usize = 16usize;
29211 pub const DEFAULT: Self = Self {
29212 time_boot_ms: 0_u32,
29213 press_abs: 0.0_f32,
29214 press_diff: 0.0_f32,
29215 temperature: 0_i16,
29216 temperature_press_diff: 0_i16,
29217 };
29218 #[cfg(feature = "arbitrary")]
29219 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29220 use arbitrary::{Arbitrary, Unstructured};
29221 let mut buf = [0u8; 1024];
29222 rng.fill_bytes(&mut buf);
29223 let mut unstructured = Unstructured::new(&buf);
29224 Self::arbitrary(&mut unstructured).unwrap_or_default()
29225 }
29226}
29227impl Default for SCALED_PRESSURE3_DATA {
29228 fn default() -> Self {
29229 Self::DEFAULT.clone()
29230 }
29231}
29232impl MessageData for SCALED_PRESSURE3_DATA {
29233 type Message = MavMessage;
29234 const ID: u32 = 143u32;
29235 const NAME: &'static str = "SCALED_PRESSURE3";
29236 const EXTRA_CRC: u8 = 131u8;
29237 const ENCODED_LEN: usize = 16usize;
29238 fn deser(
29239 _version: MavlinkVersion,
29240 __input: &[u8],
29241 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29242 let avail_len = __input.len();
29243 let mut payload_buf = [0; Self::ENCODED_LEN];
29244 let mut buf = if avail_len < Self::ENCODED_LEN {
29245 payload_buf[0..avail_len].copy_from_slice(__input);
29246 Bytes::new(&payload_buf)
29247 } else {
29248 Bytes::new(__input)
29249 };
29250 let mut __struct = Self::default();
29251 __struct.time_boot_ms = buf.get_u32_le()?;
29252 __struct.press_abs = buf.get_f32_le()?;
29253 __struct.press_diff = buf.get_f32_le()?;
29254 __struct.temperature = buf.get_i16_le()?;
29255 __struct.temperature_press_diff = buf.get_i16_le()?;
29256 Ok(__struct)
29257 }
29258 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29259 let mut __tmp = BytesMut::new(bytes);
29260 #[allow(clippy::absurd_extreme_comparisons)]
29261 #[allow(unused_comparisons)]
29262 if __tmp.remaining() < Self::ENCODED_LEN {
29263 panic!(
29264 "buffer is too small (need {} bytes, but got {})",
29265 Self::ENCODED_LEN,
29266 __tmp.remaining(),
29267 )
29268 }
29269 __tmp.put_u32_le(self.time_boot_ms);
29270 __tmp.put_f32_le(self.press_abs);
29271 __tmp.put_f32_le(self.press_diff);
29272 __tmp.put_i16_le(self.temperature);
29273 if matches!(version, MavlinkVersion::V2) {
29274 __tmp.put_i16_le(self.temperature_press_diff);
29275 let len = __tmp.len();
29276 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29277 } else {
29278 __tmp.len()
29279 }
29280 }
29281}
29282#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
29283#[doc = ""]
29284#[doc = "ID: 126"]
29285#[derive(Debug, Clone, PartialEq)]
29286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29288#[cfg_attr(feature = "ts", derive(TS))]
29289#[cfg_attr(feature = "ts", ts(export))]
29290pub struct SERIAL_CONTROL_DATA {
29291 #[doc = "Baudrate of transfer. Zero means no change."]
29292 pub baudrate: u32,
29293 #[doc = "Timeout for reply data"]
29294 pub timeout: u16,
29295 #[doc = "Serial control device type."]
29296 pub device: SerialControlDev,
29297 #[doc = "Bitmap of serial control flags."]
29298 pub flags: SerialControlFlag,
29299 #[doc = "how many bytes in this transfer"]
29300 pub count: u8,
29301 #[doc = "serial data"]
29302 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29303 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29304 pub data: [u8; 70],
29305 #[doc = "System ID"]
29306 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29307 pub target_system: u8,
29308 #[doc = "Component ID"]
29309 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29310 pub target_component: u8,
29311}
29312impl SERIAL_CONTROL_DATA {
29313 pub const ENCODED_LEN: usize = 81usize;
29314 pub const DEFAULT: Self = Self {
29315 baudrate: 0_u32,
29316 timeout: 0_u16,
29317 device: SerialControlDev::DEFAULT,
29318 flags: SerialControlFlag::DEFAULT,
29319 count: 0_u8,
29320 data: [0_u8; 70usize],
29321 target_system: 0_u8,
29322 target_component: 0_u8,
29323 };
29324 #[cfg(feature = "arbitrary")]
29325 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29326 use arbitrary::{Arbitrary, Unstructured};
29327 let mut buf = [0u8; 1024];
29328 rng.fill_bytes(&mut buf);
29329 let mut unstructured = Unstructured::new(&buf);
29330 Self::arbitrary(&mut unstructured).unwrap_or_default()
29331 }
29332}
29333impl Default for SERIAL_CONTROL_DATA {
29334 fn default() -> Self {
29335 Self::DEFAULT.clone()
29336 }
29337}
29338impl MessageData for SERIAL_CONTROL_DATA {
29339 type Message = MavMessage;
29340 const ID: u32 = 126u32;
29341 const NAME: &'static str = "SERIAL_CONTROL";
29342 const EXTRA_CRC: u8 = 220u8;
29343 const ENCODED_LEN: usize = 81usize;
29344 fn deser(
29345 _version: MavlinkVersion,
29346 __input: &[u8],
29347 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29348 let avail_len = __input.len();
29349 let mut payload_buf = [0; Self::ENCODED_LEN];
29350 let mut buf = if avail_len < Self::ENCODED_LEN {
29351 payload_buf[0..avail_len].copy_from_slice(__input);
29352 Bytes::new(&payload_buf)
29353 } else {
29354 Bytes::new(__input)
29355 };
29356 let mut __struct = Self::default();
29357 __struct.baudrate = buf.get_u32_le()?;
29358 __struct.timeout = buf.get_u16_le()?;
29359 let tmp = buf.get_u8()?;
29360 __struct.device =
29361 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29362 enum_type: "SerialControlDev",
29363 value: tmp as u64,
29364 })?;
29365 let tmp = buf.get_u8()?;
29366 __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
29367 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29368 flag_type: "SerialControlFlag",
29369 value: tmp as u64,
29370 })?;
29371 __struct.count = buf.get_u8()?;
29372 for v in &mut __struct.data {
29373 let val = buf.get_u8()?;
29374 *v = val;
29375 }
29376 __struct.target_system = buf.get_u8()?;
29377 __struct.target_component = buf.get_u8()?;
29378 Ok(__struct)
29379 }
29380 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29381 let mut __tmp = BytesMut::new(bytes);
29382 #[allow(clippy::absurd_extreme_comparisons)]
29383 #[allow(unused_comparisons)]
29384 if __tmp.remaining() < Self::ENCODED_LEN {
29385 panic!(
29386 "buffer is too small (need {} bytes, but got {})",
29387 Self::ENCODED_LEN,
29388 __tmp.remaining(),
29389 )
29390 }
29391 __tmp.put_u32_le(self.baudrate);
29392 __tmp.put_u16_le(self.timeout);
29393 __tmp.put_u8(self.device as u8);
29394 __tmp.put_u8(self.flags.bits() as u8);
29395 __tmp.put_u8(self.count);
29396 for val in &self.data {
29397 __tmp.put_u8(*val);
29398 }
29399 if matches!(version, MavlinkVersion::V2) {
29400 __tmp.put_u8(self.target_system);
29401 __tmp.put_u8(self.target_component);
29402 let len = __tmp.len();
29403 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29404 } else {
29405 __tmp.len()
29406 }
29407 }
29408}
29409#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29410#[doc = ""]
29411#[doc = "ID: 36"]
29412#[derive(Debug, Clone, PartialEq)]
29413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29415#[cfg_attr(feature = "ts", derive(TS))]
29416#[cfg_attr(feature = "ts", ts(export))]
29417pub struct SERVO_OUTPUT_RAW_DATA {
29418 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29419 pub time_usec: u32,
29420 #[doc = "Servo output 1 value"]
29421 pub servo1_raw: u16,
29422 #[doc = "Servo output 2 value"]
29423 pub servo2_raw: u16,
29424 #[doc = "Servo output 3 value"]
29425 pub servo3_raw: u16,
29426 #[doc = "Servo output 4 value"]
29427 pub servo4_raw: u16,
29428 #[doc = "Servo output 5 value"]
29429 pub servo5_raw: u16,
29430 #[doc = "Servo output 6 value"]
29431 pub servo6_raw: u16,
29432 #[doc = "Servo output 7 value"]
29433 pub servo7_raw: u16,
29434 #[doc = "Servo output 8 value"]
29435 pub servo8_raw: u16,
29436 #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29437 pub port: u8,
29438 #[doc = "Servo output 9 value"]
29439 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29440 pub servo9_raw: u16,
29441 #[doc = "Servo output 10 value"]
29442 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29443 pub servo10_raw: u16,
29444 #[doc = "Servo output 11 value"]
29445 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29446 pub servo11_raw: u16,
29447 #[doc = "Servo output 12 value"]
29448 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29449 pub servo12_raw: u16,
29450 #[doc = "Servo output 13 value"]
29451 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29452 pub servo13_raw: u16,
29453 #[doc = "Servo output 14 value"]
29454 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29455 pub servo14_raw: u16,
29456 #[doc = "Servo output 15 value"]
29457 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29458 pub servo15_raw: u16,
29459 #[doc = "Servo output 16 value"]
29460 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29461 pub servo16_raw: u16,
29462}
29463impl SERVO_OUTPUT_RAW_DATA {
29464 pub const ENCODED_LEN: usize = 37usize;
29465 pub const DEFAULT: Self = Self {
29466 time_usec: 0_u32,
29467 servo1_raw: 0_u16,
29468 servo2_raw: 0_u16,
29469 servo3_raw: 0_u16,
29470 servo4_raw: 0_u16,
29471 servo5_raw: 0_u16,
29472 servo6_raw: 0_u16,
29473 servo7_raw: 0_u16,
29474 servo8_raw: 0_u16,
29475 port: 0_u8,
29476 servo9_raw: 0_u16,
29477 servo10_raw: 0_u16,
29478 servo11_raw: 0_u16,
29479 servo12_raw: 0_u16,
29480 servo13_raw: 0_u16,
29481 servo14_raw: 0_u16,
29482 servo15_raw: 0_u16,
29483 servo16_raw: 0_u16,
29484 };
29485 #[cfg(feature = "arbitrary")]
29486 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29487 use arbitrary::{Arbitrary, Unstructured};
29488 let mut buf = [0u8; 1024];
29489 rng.fill_bytes(&mut buf);
29490 let mut unstructured = Unstructured::new(&buf);
29491 Self::arbitrary(&mut unstructured).unwrap_or_default()
29492 }
29493}
29494impl Default for SERVO_OUTPUT_RAW_DATA {
29495 fn default() -> Self {
29496 Self::DEFAULT.clone()
29497 }
29498}
29499impl MessageData for SERVO_OUTPUT_RAW_DATA {
29500 type Message = MavMessage;
29501 const ID: u32 = 36u32;
29502 const NAME: &'static str = "SERVO_OUTPUT_RAW";
29503 const EXTRA_CRC: u8 = 222u8;
29504 const ENCODED_LEN: usize = 37usize;
29505 fn deser(
29506 _version: MavlinkVersion,
29507 __input: &[u8],
29508 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29509 let avail_len = __input.len();
29510 let mut payload_buf = [0; Self::ENCODED_LEN];
29511 let mut buf = if avail_len < Self::ENCODED_LEN {
29512 payload_buf[0..avail_len].copy_from_slice(__input);
29513 Bytes::new(&payload_buf)
29514 } else {
29515 Bytes::new(__input)
29516 };
29517 let mut __struct = Self::default();
29518 __struct.time_usec = buf.get_u32_le()?;
29519 __struct.servo1_raw = buf.get_u16_le()?;
29520 __struct.servo2_raw = buf.get_u16_le()?;
29521 __struct.servo3_raw = buf.get_u16_le()?;
29522 __struct.servo4_raw = buf.get_u16_le()?;
29523 __struct.servo5_raw = buf.get_u16_le()?;
29524 __struct.servo6_raw = buf.get_u16_le()?;
29525 __struct.servo7_raw = buf.get_u16_le()?;
29526 __struct.servo8_raw = buf.get_u16_le()?;
29527 __struct.port = buf.get_u8()?;
29528 __struct.servo9_raw = buf.get_u16_le()?;
29529 __struct.servo10_raw = buf.get_u16_le()?;
29530 __struct.servo11_raw = buf.get_u16_le()?;
29531 __struct.servo12_raw = buf.get_u16_le()?;
29532 __struct.servo13_raw = buf.get_u16_le()?;
29533 __struct.servo14_raw = buf.get_u16_le()?;
29534 __struct.servo15_raw = buf.get_u16_le()?;
29535 __struct.servo16_raw = buf.get_u16_le()?;
29536 Ok(__struct)
29537 }
29538 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29539 let mut __tmp = BytesMut::new(bytes);
29540 #[allow(clippy::absurd_extreme_comparisons)]
29541 #[allow(unused_comparisons)]
29542 if __tmp.remaining() < Self::ENCODED_LEN {
29543 panic!(
29544 "buffer is too small (need {} bytes, but got {})",
29545 Self::ENCODED_LEN,
29546 __tmp.remaining(),
29547 )
29548 }
29549 __tmp.put_u32_le(self.time_usec);
29550 __tmp.put_u16_le(self.servo1_raw);
29551 __tmp.put_u16_le(self.servo2_raw);
29552 __tmp.put_u16_le(self.servo3_raw);
29553 __tmp.put_u16_le(self.servo4_raw);
29554 __tmp.put_u16_le(self.servo5_raw);
29555 __tmp.put_u16_le(self.servo6_raw);
29556 __tmp.put_u16_le(self.servo7_raw);
29557 __tmp.put_u16_le(self.servo8_raw);
29558 __tmp.put_u8(self.port);
29559 if matches!(version, MavlinkVersion::V2) {
29560 __tmp.put_u16_le(self.servo9_raw);
29561 __tmp.put_u16_le(self.servo10_raw);
29562 __tmp.put_u16_le(self.servo11_raw);
29563 __tmp.put_u16_le(self.servo12_raw);
29564 __tmp.put_u16_le(self.servo13_raw);
29565 __tmp.put_u16_le(self.servo14_raw);
29566 __tmp.put_u16_le(self.servo15_raw);
29567 __tmp.put_u16_le(self.servo16_raw);
29568 let len = __tmp.len();
29569 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29570 } else {
29571 __tmp.len()
29572 }
29573 }
29574}
29575#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
29576#[doc = ""]
29577#[doc = "ID: 256"]
29578#[derive(Debug, Clone, PartialEq)]
29579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29581#[cfg_attr(feature = "ts", derive(TS))]
29582#[cfg_attr(feature = "ts", ts(export))]
29583pub struct SETUP_SIGNING_DATA {
29584 #[doc = "initial timestamp"]
29585 pub initial_timestamp: u64,
29586 #[doc = "system id of the target"]
29587 pub target_system: u8,
29588 #[doc = "component ID of the target"]
29589 pub target_component: u8,
29590 #[doc = "signing key"]
29591 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29592 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29593 pub secret_key: [u8; 32],
29594}
29595impl SETUP_SIGNING_DATA {
29596 pub const ENCODED_LEN: usize = 42usize;
29597 pub const DEFAULT: Self = Self {
29598 initial_timestamp: 0_u64,
29599 target_system: 0_u8,
29600 target_component: 0_u8,
29601 secret_key: [0_u8; 32usize],
29602 };
29603 #[cfg(feature = "arbitrary")]
29604 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29605 use arbitrary::{Arbitrary, Unstructured};
29606 let mut buf = [0u8; 1024];
29607 rng.fill_bytes(&mut buf);
29608 let mut unstructured = Unstructured::new(&buf);
29609 Self::arbitrary(&mut unstructured).unwrap_or_default()
29610 }
29611}
29612impl Default for SETUP_SIGNING_DATA {
29613 fn default() -> Self {
29614 Self::DEFAULT.clone()
29615 }
29616}
29617impl MessageData for SETUP_SIGNING_DATA {
29618 type Message = MavMessage;
29619 const ID: u32 = 256u32;
29620 const NAME: &'static str = "SETUP_SIGNING";
29621 const EXTRA_CRC: u8 = 71u8;
29622 const ENCODED_LEN: usize = 42usize;
29623 fn deser(
29624 _version: MavlinkVersion,
29625 __input: &[u8],
29626 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29627 let avail_len = __input.len();
29628 let mut payload_buf = [0; Self::ENCODED_LEN];
29629 let mut buf = if avail_len < Self::ENCODED_LEN {
29630 payload_buf[0..avail_len].copy_from_slice(__input);
29631 Bytes::new(&payload_buf)
29632 } else {
29633 Bytes::new(__input)
29634 };
29635 let mut __struct = Self::default();
29636 __struct.initial_timestamp = buf.get_u64_le()?;
29637 __struct.target_system = buf.get_u8()?;
29638 __struct.target_component = buf.get_u8()?;
29639 for v in &mut __struct.secret_key {
29640 let val = buf.get_u8()?;
29641 *v = val;
29642 }
29643 Ok(__struct)
29644 }
29645 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29646 let mut __tmp = BytesMut::new(bytes);
29647 #[allow(clippy::absurd_extreme_comparisons)]
29648 #[allow(unused_comparisons)]
29649 if __tmp.remaining() < Self::ENCODED_LEN {
29650 panic!(
29651 "buffer is too small (need {} bytes, but got {})",
29652 Self::ENCODED_LEN,
29653 __tmp.remaining(),
29654 )
29655 }
29656 __tmp.put_u64_le(self.initial_timestamp);
29657 __tmp.put_u8(self.target_system);
29658 __tmp.put_u8(self.target_component);
29659 for val in &self.secret_key {
29660 __tmp.put_u8(*val);
29661 }
29662 if matches!(version, MavlinkVersion::V2) {
29663 let len = __tmp.len();
29664 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29665 } else {
29666 __tmp.len()
29667 }
29668 }
29669}
29670#[doc = "Set the vehicle attitude and body angular rates."]
29671#[doc = ""]
29672#[doc = "ID: 139"]
29673#[derive(Debug, Clone, PartialEq)]
29674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29676#[cfg_attr(feature = "ts", derive(TS))]
29677#[cfg_attr(feature = "ts", ts(export))]
29678pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
29679 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29680 pub time_usec: u64,
29681 #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
29682 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29683 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29684 pub controls: [f32; 8],
29685 #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
29686 pub group_mlx: u8,
29687 #[doc = "System ID"]
29688 pub target_system: u8,
29689 #[doc = "Component ID"]
29690 pub target_component: u8,
29691}
29692impl SET_ACTUATOR_CONTROL_TARGET_DATA {
29693 pub const ENCODED_LEN: usize = 43usize;
29694 pub const DEFAULT: Self = Self {
29695 time_usec: 0_u64,
29696 controls: [0.0_f32; 8usize],
29697 group_mlx: 0_u8,
29698 target_system: 0_u8,
29699 target_component: 0_u8,
29700 };
29701 #[cfg(feature = "arbitrary")]
29702 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29703 use arbitrary::{Arbitrary, Unstructured};
29704 let mut buf = [0u8; 1024];
29705 rng.fill_bytes(&mut buf);
29706 let mut unstructured = Unstructured::new(&buf);
29707 Self::arbitrary(&mut unstructured).unwrap_or_default()
29708 }
29709}
29710impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
29711 fn default() -> Self {
29712 Self::DEFAULT.clone()
29713 }
29714}
29715impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
29716 type Message = MavMessage;
29717 const ID: u32 = 139u32;
29718 const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
29719 const EXTRA_CRC: u8 = 168u8;
29720 const ENCODED_LEN: usize = 43usize;
29721 fn deser(
29722 _version: MavlinkVersion,
29723 __input: &[u8],
29724 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29725 let avail_len = __input.len();
29726 let mut payload_buf = [0; Self::ENCODED_LEN];
29727 let mut buf = if avail_len < Self::ENCODED_LEN {
29728 payload_buf[0..avail_len].copy_from_slice(__input);
29729 Bytes::new(&payload_buf)
29730 } else {
29731 Bytes::new(__input)
29732 };
29733 let mut __struct = Self::default();
29734 __struct.time_usec = buf.get_u64_le()?;
29735 for v in &mut __struct.controls {
29736 let val = buf.get_f32_le()?;
29737 *v = val;
29738 }
29739 __struct.group_mlx = buf.get_u8()?;
29740 __struct.target_system = buf.get_u8()?;
29741 __struct.target_component = buf.get_u8()?;
29742 Ok(__struct)
29743 }
29744 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29745 let mut __tmp = BytesMut::new(bytes);
29746 #[allow(clippy::absurd_extreme_comparisons)]
29747 #[allow(unused_comparisons)]
29748 if __tmp.remaining() < Self::ENCODED_LEN {
29749 panic!(
29750 "buffer is too small (need {} bytes, but got {})",
29751 Self::ENCODED_LEN,
29752 __tmp.remaining(),
29753 )
29754 }
29755 __tmp.put_u64_le(self.time_usec);
29756 for val in &self.controls {
29757 __tmp.put_f32_le(*val);
29758 }
29759 __tmp.put_u8(self.group_mlx);
29760 __tmp.put_u8(self.target_system);
29761 __tmp.put_u8(self.target_component);
29762 if matches!(version, MavlinkVersion::V2) {
29763 let len = __tmp.len();
29764 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29765 } else {
29766 __tmp.len()
29767 }
29768 }
29769}
29770#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
29771#[doc = ""]
29772#[doc = "ID: 82"]
29773#[derive(Debug, Clone, PartialEq)]
29774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29776#[cfg_attr(feature = "ts", derive(TS))]
29777#[cfg_attr(feature = "ts", ts(export))]
29778pub struct SET_ATTITUDE_TARGET_DATA {
29779 #[doc = "Timestamp (time since system boot)."]
29780 pub time_boot_ms: u32,
29781 #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
29782 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29783 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29784 pub q: [f32; 4],
29785 #[doc = "Body roll rate"]
29786 pub body_roll_rate: f32,
29787 #[doc = "Body pitch rate"]
29788 pub body_pitch_rate: f32,
29789 #[doc = "Body yaw rate"]
29790 pub body_yaw_rate: f32,
29791 #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
29792 pub thrust: f32,
29793 #[doc = "System ID"]
29794 pub target_system: u8,
29795 #[doc = "Component ID"]
29796 pub target_component: u8,
29797 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29798 pub type_mask: AttitudeTargetTypemask,
29799 #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
29800 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29801 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29802 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29803 pub thrust_body: [f32; 3],
29804}
29805impl SET_ATTITUDE_TARGET_DATA {
29806 pub const ENCODED_LEN: usize = 51usize;
29807 pub const DEFAULT: Self = Self {
29808 time_boot_ms: 0_u32,
29809 q: [0.0_f32; 4usize],
29810 body_roll_rate: 0.0_f32,
29811 body_pitch_rate: 0.0_f32,
29812 body_yaw_rate: 0.0_f32,
29813 thrust: 0.0_f32,
29814 target_system: 0_u8,
29815 target_component: 0_u8,
29816 type_mask: AttitudeTargetTypemask::DEFAULT,
29817 thrust_body: [0.0_f32; 3usize],
29818 };
29819 #[cfg(feature = "arbitrary")]
29820 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29821 use arbitrary::{Arbitrary, Unstructured};
29822 let mut buf = [0u8; 1024];
29823 rng.fill_bytes(&mut buf);
29824 let mut unstructured = Unstructured::new(&buf);
29825 Self::arbitrary(&mut unstructured).unwrap_or_default()
29826 }
29827}
29828impl Default for SET_ATTITUDE_TARGET_DATA {
29829 fn default() -> Self {
29830 Self::DEFAULT.clone()
29831 }
29832}
29833impl MessageData for SET_ATTITUDE_TARGET_DATA {
29834 type Message = MavMessage;
29835 const ID: u32 = 82u32;
29836 const NAME: &'static str = "SET_ATTITUDE_TARGET";
29837 const EXTRA_CRC: u8 = 49u8;
29838 const ENCODED_LEN: usize = 51usize;
29839 fn deser(
29840 _version: MavlinkVersion,
29841 __input: &[u8],
29842 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29843 let avail_len = __input.len();
29844 let mut payload_buf = [0; Self::ENCODED_LEN];
29845 let mut buf = if avail_len < Self::ENCODED_LEN {
29846 payload_buf[0..avail_len].copy_from_slice(__input);
29847 Bytes::new(&payload_buf)
29848 } else {
29849 Bytes::new(__input)
29850 };
29851 let mut __struct = Self::default();
29852 __struct.time_boot_ms = buf.get_u32_le()?;
29853 for v in &mut __struct.q {
29854 let val = buf.get_f32_le()?;
29855 *v = val;
29856 }
29857 __struct.body_roll_rate = buf.get_f32_le()?;
29858 __struct.body_pitch_rate = buf.get_f32_le()?;
29859 __struct.body_yaw_rate = buf.get_f32_le()?;
29860 __struct.thrust = buf.get_f32_le()?;
29861 __struct.target_system = buf.get_u8()?;
29862 __struct.target_component = buf.get_u8()?;
29863 let tmp = buf.get_u8()?;
29864 __struct.type_mask =
29865 AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
29866 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29867 flag_type: "AttitudeTargetTypemask",
29868 value: tmp as u64,
29869 })?;
29870 for v in &mut __struct.thrust_body {
29871 let val = buf.get_f32_le()?;
29872 *v = val;
29873 }
29874 Ok(__struct)
29875 }
29876 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29877 let mut __tmp = BytesMut::new(bytes);
29878 #[allow(clippy::absurd_extreme_comparisons)]
29879 #[allow(unused_comparisons)]
29880 if __tmp.remaining() < Self::ENCODED_LEN {
29881 panic!(
29882 "buffer is too small (need {} bytes, but got {})",
29883 Self::ENCODED_LEN,
29884 __tmp.remaining(),
29885 )
29886 }
29887 __tmp.put_u32_le(self.time_boot_ms);
29888 for val in &self.q {
29889 __tmp.put_f32_le(*val);
29890 }
29891 __tmp.put_f32_le(self.body_roll_rate);
29892 __tmp.put_f32_le(self.body_pitch_rate);
29893 __tmp.put_f32_le(self.body_yaw_rate);
29894 __tmp.put_f32_le(self.thrust);
29895 __tmp.put_u8(self.target_system);
29896 __tmp.put_u8(self.target_component);
29897 __tmp.put_u8(self.type_mask.bits() as u8);
29898 if matches!(version, MavlinkVersion::V2) {
29899 for val in &self.thrust_body {
29900 __tmp.put_f32_le(*val);
29901 }
29902 let len = __tmp.len();
29903 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29904 } else {
29905 __tmp.len()
29906 }
29907 }
29908}
29909#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
29910#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
29911#[doc = ""]
29912#[doc = "ID: 48"]
29913#[derive(Debug, Clone, PartialEq)]
29914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29916#[cfg_attr(feature = "ts", derive(TS))]
29917#[cfg_attr(feature = "ts", ts(export))]
29918pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
29919 #[doc = "Latitude (WGS84)"]
29920 pub latitude: i32,
29921 #[doc = "Longitude (WGS84)"]
29922 pub longitude: i32,
29923 #[doc = "Altitude (MSL). Positive for up."]
29924 pub altitude: i32,
29925 #[doc = "System ID"]
29926 pub target_system: u8,
29927 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29928 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29929 pub time_usec: u64,
29930}
29931impl SET_GPS_GLOBAL_ORIGIN_DATA {
29932 pub const ENCODED_LEN: usize = 21usize;
29933 pub const DEFAULT: Self = Self {
29934 latitude: 0_i32,
29935 longitude: 0_i32,
29936 altitude: 0_i32,
29937 target_system: 0_u8,
29938 time_usec: 0_u64,
29939 };
29940 #[cfg(feature = "arbitrary")]
29941 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29942 use arbitrary::{Arbitrary, Unstructured};
29943 let mut buf = [0u8; 1024];
29944 rng.fill_bytes(&mut buf);
29945 let mut unstructured = Unstructured::new(&buf);
29946 Self::arbitrary(&mut unstructured).unwrap_or_default()
29947 }
29948}
29949impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29950 fn default() -> Self {
29951 Self::DEFAULT.clone()
29952 }
29953}
29954impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29955 type Message = MavMessage;
29956 const ID: u32 = 48u32;
29957 const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29958 const EXTRA_CRC: u8 = 41u8;
29959 const ENCODED_LEN: usize = 21usize;
29960 fn deser(
29961 _version: MavlinkVersion,
29962 __input: &[u8],
29963 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29964 let avail_len = __input.len();
29965 let mut payload_buf = [0; Self::ENCODED_LEN];
29966 let mut buf = if avail_len < Self::ENCODED_LEN {
29967 payload_buf[0..avail_len].copy_from_slice(__input);
29968 Bytes::new(&payload_buf)
29969 } else {
29970 Bytes::new(__input)
29971 };
29972 let mut __struct = Self::default();
29973 __struct.latitude = buf.get_i32_le()?;
29974 __struct.longitude = buf.get_i32_le()?;
29975 __struct.altitude = buf.get_i32_le()?;
29976 __struct.target_system = buf.get_u8()?;
29977 __struct.time_usec = buf.get_u64_le()?;
29978 Ok(__struct)
29979 }
29980 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29981 let mut __tmp = BytesMut::new(bytes);
29982 #[allow(clippy::absurd_extreme_comparisons)]
29983 #[allow(unused_comparisons)]
29984 if __tmp.remaining() < Self::ENCODED_LEN {
29985 panic!(
29986 "buffer is too small (need {} bytes, but got {})",
29987 Self::ENCODED_LEN,
29988 __tmp.remaining(),
29989 )
29990 }
29991 __tmp.put_i32_le(self.latitude);
29992 __tmp.put_i32_le(self.longitude);
29993 __tmp.put_i32_le(self.altitude);
29994 __tmp.put_u8(self.target_system);
29995 if matches!(version, MavlinkVersion::V2) {
29996 __tmp.put_u64_le(self.time_usec);
29997 let len = __tmp.len();
29998 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29999 } else {
30000 __tmp.len()
30001 }
30002 }
30003}
30004#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
30005#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on. The position is set automatically by the system during the takeoff (and may also be set using this message). The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
30006#[doc = ""]
30007#[doc = "ID: 243"]
30008#[derive(Debug, Clone, PartialEq)]
30009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30011#[cfg_attr(feature = "ts", derive(TS))]
30012#[cfg_attr(feature = "ts", ts(export))]
30013pub struct SET_HOME_POSITION_DATA {
30014 #[doc = "Latitude (WGS84)"]
30015 pub latitude: i32,
30016 #[doc = "Longitude (WGS84)"]
30017 pub longitude: i32,
30018 #[doc = "Altitude (MSL). Positive for up."]
30019 pub altitude: i32,
30020 #[doc = "Local X position of this position in the local coordinate frame (NED)"]
30021 pub x: f32,
30022 #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
30023 pub y: f32,
30024 #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
30025 pub z: f32,
30026 #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
30027 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30028 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30029 pub q: [f32; 4],
30030 #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30031 pub approach_x: f32,
30032 #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30033 pub approach_y: f32,
30034 #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30035 pub approach_z: f32,
30036 #[doc = "System ID."]
30037 pub target_system: u8,
30038 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30039 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30040 pub time_usec: u64,
30041}
30042impl SET_HOME_POSITION_DATA {
30043 pub const ENCODED_LEN: usize = 61usize;
30044 pub const DEFAULT: Self = Self {
30045 latitude: 0_i32,
30046 longitude: 0_i32,
30047 altitude: 0_i32,
30048 x: 0.0_f32,
30049 y: 0.0_f32,
30050 z: 0.0_f32,
30051 q: [0.0_f32; 4usize],
30052 approach_x: 0.0_f32,
30053 approach_y: 0.0_f32,
30054 approach_z: 0.0_f32,
30055 target_system: 0_u8,
30056 time_usec: 0_u64,
30057 };
30058 #[cfg(feature = "arbitrary")]
30059 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30060 use arbitrary::{Arbitrary, Unstructured};
30061 let mut buf = [0u8; 1024];
30062 rng.fill_bytes(&mut buf);
30063 let mut unstructured = Unstructured::new(&buf);
30064 Self::arbitrary(&mut unstructured).unwrap_or_default()
30065 }
30066}
30067impl Default for SET_HOME_POSITION_DATA {
30068 fn default() -> Self {
30069 Self::DEFAULT.clone()
30070 }
30071}
30072impl MessageData for SET_HOME_POSITION_DATA {
30073 type Message = MavMessage;
30074 const ID: u32 = 243u32;
30075 const NAME: &'static str = "SET_HOME_POSITION";
30076 const EXTRA_CRC: u8 = 85u8;
30077 const ENCODED_LEN: usize = 61usize;
30078 fn deser(
30079 _version: MavlinkVersion,
30080 __input: &[u8],
30081 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30082 let avail_len = __input.len();
30083 let mut payload_buf = [0; Self::ENCODED_LEN];
30084 let mut buf = if avail_len < Self::ENCODED_LEN {
30085 payload_buf[0..avail_len].copy_from_slice(__input);
30086 Bytes::new(&payload_buf)
30087 } else {
30088 Bytes::new(__input)
30089 };
30090 let mut __struct = Self::default();
30091 __struct.latitude = buf.get_i32_le()?;
30092 __struct.longitude = buf.get_i32_le()?;
30093 __struct.altitude = buf.get_i32_le()?;
30094 __struct.x = buf.get_f32_le()?;
30095 __struct.y = buf.get_f32_le()?;
30096 __struct.z = buf.get_f32_le()?;
30097 for v in &mut __struct.q {
30098 let val = buf.get_f32_le()?;
30099 *v = val;
30100 }
30101 __struct.approach_x = buf.get_f32_le()?;
30102 __struct.approach_y = buf.get_f32_le()?;
30103 __struct.approach_z = buf.get_f32_le()?;
30104 __struct.target_system = buf.get_u8()?;
30105 __struct.time_usec = buf.get_u64_le()?;
30106 Ok(__struct)
30107 }
30108 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30109 let mut __tmp = BytesMut::new(bytes);
30110 #[allow(clippy::absurd_extreme_comparisons)]
30111 #[allow(unused_comparisons)]
30112 if __tmp.remaining() < Self::ENCODED_LEN {
30113 panic!(
30114 "buffer is too small (need {} bytes, but got {})",
30115 Self::ENCODED_LEN,
30116 __tmp.remaining(),
30117 )
30118 }
30119 __tmp.put_i32_le(self.latitude);
30120 __tmp.put_i32_le(self.longitude);
30121 __tmp.put_i32_le(self.altitude);
30122 __tmp.put_f32_le(self.x);
30123 __tmp.put_f32_le(self.y);
30124 __tmp.put_f32_le(self.z);
30125 for val in &self.q {
30126 __tmp.put_f32_le(*val);
30127 }
30128 __tmp.put_f32_le(self.approach_x);
30129 __tmp.put_f32_le(self.approach_y);
30130 __tmp.put_f32_le(self.approach_z);
30131 __tmp.put_u8(self.target_system);
30132 if matches!(version, MavlinkVersion::V2) {
30133 __tmp.put_u64_le(self.time_usec);
30134 let len = __tmp.len();
30135 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30136 } else {
30137 __tmp.len()
30138 }
30139 }
30140}
30141#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
30142#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30143#[doc = ""]
30144#[doc = "ID: 11"]
30145#[derive(Debug, Clone, PartialEq)]
30146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30148#[cfg_attr(feature = "ts", derive(TS))]
30149#[cfg_attr(feature = "ts", ts(export))]
30150pub struct SET_MODE_DATA {
30151 #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30152 pub custom_mode: u32,
30153 #[doc = "The system setting the mode"]
30154 pub target_system: u8,
30155 #[doc = "The new base mode."]
30156 pub base_mode: MavMode,
30157}
30158impl SET_MODE_DATA {
30159 pub const ENCODED_LEN: usize = 6usize;
30160 pub const DEFAULT: Self = Self {
30161 custom_mode: 0_u32,
30162 target_system: 0_u8,
30163 base_mode: MavMode::DEFAULT,
30164 };
30165 #[cfg(feature = "arbitrary")]
30166 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30167 use arbitrary::{Arbitrary, Unstructured};
30168 let mut buf = [0u8; 1024];
30169 rng.fill_bytes(&mut buf);
30170 let mut unstructured = Unstructured::new(&buf);
30171 Self::arbitrary(&mut unstructured).unwrap_or_default()
30172 }
30173}
30174impl Default for SET_MODE_DATA {
30175 fn default() -> Self {
30176 Self::DEFAULT.clone()
30177 }
30178}
30179impl MessageData for SET_MODE_DATA {
30180 type Message = MavMessage;
30181 const ID: u32 = 11u32;
30182 const NAME: &'static str = "SET_MODE";
30183 const EXTRA_CRC: u8 = 89u8;
30184 const ENCODED_LEN: usize = 6usize;
30185 fn deser(
30186 _version: MavlinkVersion,
30187 __input: &[u8],
30188 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30189 let avail_len = __input.len();
30190 let mut payload_buf = [0; Self::ENCODED_LEN];
30191 let mut buf = if avail_len < Self::ENCODED_LEN {
30192 payload_buf[0..avail_len].copy_from_slice(__input);
30193 Bytes::new(&payload_buf)
30194 } else {
30195 Bytes::new(__input)
30196 };
30197 let mut __struct = Self::default();
30198 __struct.custom_mode = buf.get_u32_le()?;
30199 __struct.target_system = buf.get_u8()?;
30200 let tmp = buf.get_u8()?;
30201 __struct.base_mode =
30202 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30203 enum_type: "MavMode",
30204 value: tmp as u64,
30205 })?;
30206 Ok(__struct)
30207 }
30208 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30209 let mut __tmp = BytesMut::new(bytes);
30210 #[allow(clippy::absurd_extreme_comparisons)]
30211 #[allow(unused_comparisons)]
30212 if __tmp.remaining() < Self::ENCODED_LEN {
30213 panic!(
30214 "buffer is too small (need {} bytes, but got {})",
30215 Self::ENCODED_LEN,
30216 __tmp.remaining(),
30217 )
30218 }
30219 __tmp.put_u32_le(self.custom_mode);
30220 __tmp.put_u8(self.target_system);
30221 __tmp.put_u8(self.base_mode as u8);
30222 if matches!(version, MavlinkVersion::V2) {
30223 let len = __tmp.len();
30224 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30225 } else {
30226 __tmp.len()
30227 }
30228 }
30229}
30230#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30231#[doc = ""]
30232#[doc = "ID: 86"]
30233#[derive(Debug, Clone, PartialEq)]
30234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30236#[cfg_attr(feature = "ts", derive(TS))]
30237#[cfg_attr(feature = "ts", ts(export))]
30238pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30239 #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30240 pub time_boot_ms: u32,
30241 #[doc = "Latitude in WGS84 frame"]
30242 pub lat_int: i32,
30243 #[doc = "Longitude in WGS84 frame"]
30244 pub lon_int: i32,
30245 #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30246 pub alt: f32,
30247 #[doc = "X velocity in NED frame"]
30248 pub vx: f32,
30249 #[doc = "Y velocity in NED frame"]
30250 pub vy: f32,
30251 #[doc = "Z velocity in NED frame"]
30252 pub vz: f32,
30253 #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30254 pub afx: f32,
30255 #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30256 pub afy: f32,
30257 #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30258 pub afz: f32,
30259 #[doc = "yaw setpoint"]
30260 pub yaw: f32,
30261 #[doc = "yaw rate setpoint"]
30262 pub yaw_rate: f32,
30263 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30264 pub type_mask: PositionTargetTypemask,
30265 #[doc = "System ID"]
30266 pub target_system: u8,
30267 #[doc = "Component ID"]
30268 pub target_component: u8,
30269 #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
30270 pub coordinate_frame: MavFrame,
30271}
30272impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
30273 pub const ENCODED_LEN: usize = 53usize;
30274 pub const DEFAULT: Self = Self {
30275 time_boot_ms: 0_u32,
30276 lat_int: 0_i32,
30277 lon_int: 0_i32,
30278 alt: 0.0_f32,
30279 vx: 0.0_f32,
30280 vy: 0.0_f32,
30281 vz: 0.0_f32,
30282 afx: 0.0_f32,
30283 afy: 0.0_f32,
30284 afz: 0.0_f32,
30285 yaw: 0.0_f32,
30286 yaw_rate: 0.0_f32,
30287 type_mask: PositionTargetTypemask::DEFAULT,
30288 target_system: 0_u8,
30289 target_component: 0_u8,
30290 coordinate_frame: MavFrame::DEFAULT,
30291 };
30292 #[cfg(feature = "arbitrary")]
30293 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30294 use arbitrary::{Arbitrary, Unstructured};
30295 let mut buf = [0u8; 1024];
30296 rng.fill_bytes(&mut buf);
30297 let mut unstructured = Unstructured::new(&buf);
30298 Self::arbitrary(&mut unstructured).unwrap_or_default()
30299 }
30300}
30301impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30302 fn default() -> Self {
30303 Self::DEFAULT.clone()
30304 }
30305}
30306impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30307 type Message = MavMessage;
30308 const ID: u32 = 86u32;
30309 const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
30310 const EXTRA_CRC: u8 = 5u8;
30311 const ENCODED_LEN: usize = 53usize;
30312 fn deser(
30313 _version: MavlinkVersion,
30314 __input: &[u8],
30315 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30316 let avail_len = __input.len();
30317 let mut payload_buf = [0; Self::ENCODED_LEN];
30318 let mut buf = if avail_len < Self::ENCODED_LEN {
30319 payload_buf[0..avail_len].copy_from_slice(__input);
30320 Bytes::new(&payload_buf)
30321 } else {
30322 Bytes::new(__input)
30323 };
30324 let mut __struct = Self::default();
30325 __struct.time_boot_ms = buf.get_u32_le()?;
30326 __struct.lat_int = buf.get_i32_le()?;
30327 __struct.lon_int = buf.get_i32_le()?;
30328 __struct.alt = buf.get_f32_le()?;
30329 __struct.vx = buf.get_f32_le()?;
30330 __struct.vy = buf.get_f32_le()?;
30331 __struct.vz = buf.get_f32_le()?;
30332 __struct.afx = buf.get_f32_le()?;
30333 __struct.afy = buf.get_f32_le()?;
30334 __struct.afz = buf.get_f32_le()?;
30335 __struct.yaw = buf.get_f32_le()?;
30336 __struct.yaw_rate = buf.get_f32_le()?;
30337 let tmp = buf.get_u16_le()?;
30338 __struct.type_mask =
30339 PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30340 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30341 flag_type: "PositionTargetTypemask",
30342 value: tmp as u64,
30343 })?;
30344 __struct.target_system = buf.get_u8()?;
30345 __struct.target_component = buf.get_u8()?;
30346 let tmp = buf.get_u8()?;
30347 __struct.coordinate_frame =
30348 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30349 enum_type: "MavFrame",
30350 value: tmp as u64,
30351 })?;
30352 Ok(__struct)
30353 }
30354 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30355 let mut __tmp = BytesMut::new(bytes);
30356 #[allow(clippy::absurd_extreme_comparisons)]
30357 #[allow(unused_comparisons)]
30358 if __tmp.remaining() < Self::ENCODED_LEN {
30359 panic!(
30360 "buffer is too small (need {} bytes, but got {})",
30361 Self::ENCODED_LEN,
30362 __tmp.remaining(),
30363 )
30364 }
30365 __tmp.put_u32_le(self.time_boot_ms);
30366 __tmp.put_i32_le(self.lat_int);
30367 __tmp.put_i32_le(self.lon_int);
30368 __tmp.put_f32_le(self.alt);
30369 __tmp.put_f32_le(self.vx);
30370 __tmp.put_f32_le(self.vy);
30371 __tmp.put_f32_le(self.vz);
30372 __tmp.put_f32_le(self.afx);
30373 __tmp.put_f32_le(self.afy);
30374 __tmp.put_f32_le(self.afz);
30375 __tmp.put_f32_le(self.yaw);
30376 __tmp.put_f32_le(self.yaw_rate);
30377 __tmp.put_u16_le(self.type_mask.bits() as u16);
30378 __tmp.put_u8(self.target_system);
30379 __tmp.put_u8(self.target_component);
30380 __tmp.put_u8(self.coordinate_frame as u8);
30381 if matches!(version, MavlinkVersion::V2) {
30382 let len = __tmp.len();
30383 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30384 } else {
30385 __tmp.len()
30386 }
30387 }
30388}
30389#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30390#[doc = ""]
30391#[doc = "ID: 84"]
30392#[derive(Debug, Clone, PartialEq)]
30393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30395#[cfg_attr(feature = "ts", derive(TS))]
30396#[cfg_attr(feature = "ts", ts(export))]
30397pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30398 #[doc = "Timestamp (time since system boot)."]
30399 pub time_boot_ms: u32,
30400 #[doc = "X Position in NED frame"]
30401 pub x: f32,
30402 #[doc = "Y Position in NED frame"]
30403 pub y: f32,
30404 #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30405 pub z: f32,
30406 #[doc = "X velocity in NED frame"]
30407 pub vx: f32,
30408 #[doc = "Y velocity in NED frame"]
30409 pub vy: f32,
30410 #[doc = "Z velocity in NED frame"]
30411 pub vz: f32,
30412 #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30413 pub afx: f32,
30414 #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30415 pub afy: f32,
30416 #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30417 pub afz: f32,
30418 #[doc = "yaw setpoint"]
30419 pub yaw: f32,
30420 #[doc = "yaw rate setpoint"]
30421 pub yaw_rate: f32,
30422 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30423 pub type_mask: PositionTargetTypemask,
30424 #[doc = "System ID"]
30425 pub target_system: u8,
30426 #[doc = "Component ID"]
30427 pub target_component: u8,
30428 #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30429 pub coordinate_frame: MavFrame,
30430}
30431impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30432 pub const ENCODED_LEN: usize = 53usize;
30433 pub const DEFAULT: Self = Self {
30434 time_boot_ms: 0_u32,
30435 x: 0.0_f32,
30436 y: 0.0_f32,
30437 z: 0.0_f32,
30438 vx: 0.0_f32,
30439 vy: 0.0_f32,
30440 vz: 0.0_f32,
30441 afx: 0.0_f32,
30442 afy: 0.0_f32,
30443 afz: 0.0_f32,
30444 yaw: 0.0_f32,
30445 yaw_rate: 0.0_f32,
30446 type_mask: PositionTargetTypemask::DEFAULT,
30447 target_system: 0_u8,
30448 target_component: 0_u8,
30449 coordinate_frame: MavFrame::DEFAULT,
30450 };
30451 #[cfg(feature = "arbitrary")]
30452 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30453 use arbitrary::{Arbitrary, Unstructured};
30454 let mut buf = [0u8; 1024];
30455 rng.fill_bytes(&mut buf);
30456 let mut unstructured = Unstructured::new(&buf);
30457 Self::arbitrary(&mut unstructured).unwrap_or_default()
30458 }
30459}
30460impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30461 fn default() -> Self {
30462 Self::DEFAULT.clone()
30463 }
30464}
30465impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30466 type Message = MavMessage;
30467 const ID: u32 = 84u32;
30468 const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30469 const EXTRA_CRC: u8 = 143u8;
30470 const ENCODED_LEN: usize = 53usize;
30471 fn deser(
30472 _version: MavlinkVersion,
30473 __input: &[u8],
30474 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30475 let avail_len = __input.len();
30476 let mut payload_buf = [0; Self::ENCODED_LEN];
30477 let mut buf = if avail_len < Self::ENCODED_LEN {
30478 payload_buf[0..avail_len].copy_from_slice(__input);
30479 Bytes::new(&payload_buf)
30480 } else {
30481 Bytes::new(__input)
30482 };
30483 let mut __struct = Self::default();
30484 __struct.time_boot_ms = buf.get_u32_le()?;
30485 __struct.x = buf.get_f32_le()?;
30486 __struct.y = buf.get_f32_le()?;
30487 __struct.z = buf.get_f32_le()?;
30488 __struct.vx = buf.get_f32_le()?;
30489 __struct.vy = buf.get_f32_le()?;
30490 __struct.vz = buf.get_f32_le()?;
30491 __struct.afx = buf.get_f32_le()?;
30492 __struct.afy = buf.get_f32_le()?;
30493 __struct.afz = buf.get_f32_le()?;
30494 __struct.yaw = buf.get_f32_le()?;
30495 __struct.yaw_rate = buf.get_f32_le()?;
30496 let tmp = buf.get_u16_le()?;
30497 __struct.type_mask =
30498 PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30499 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30500 flag_type: "PositionTargetTypemask",
30501 value: tmp as u64,
30502 })?;
30503 __struct.target_system = buf.get_u8()?;
30504 __struct.target_component = buf.get_u8()?;
30505 let tmp = buf.get_u8()?;
30506 __struct.coordinate_frame =
30507 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30508 enum_type: "MavFrame",
30509 value: tmp as u64,
30510 })?;
30511 Ok(__struct)
30512 }
30513 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30514 let mut __tmp = BytesMut::new(bytes);
30515 #[allow(clippy::absurd_extreme_comparisons)]
30516 #[allow(unused_comparisons)]
30517 if __tmp.remaining() < Self::ENCODED_LEN {
30518 panic!(
30519 "buffer is too small (need {} bytes, but got {})",
30520 Self::ENCODED_LEN,
30521 __tmp.remaining(),
30522 )
30523 }
30524 __tmp.put_u32_le(self.time_boot_ms);
30525 __tmp.put_f32_le(self.x);
30526 __tmp.put_f32_le(self.y);
30527 __tmp.put_f32_le(self.z);
30528 __tmp.put_f32_le(self.vx);
30529 __tmp.put_f32_le(self.vy);
30530 __tmp.put_f32_le(self.vz);
30531 __tmp.put_f32_le(self.afx);
30532 __tmp.put_f32_le(self.afy);
30533 __tmp.put_f32_le(self.afz);
30534 __tmp.put_f32_le(self.yaw);
30535 __tmp.put_f32_le(self.yaw_rate);
30536 __tmp.put_u16_le(self.type_mask.bits() as u16);
30537 __tmp.put_u8(self.target_system);
30538 __tmp.put_u8(self.target_component);
30539 __tmp.put_u8(self.coordinate_frame as u8);
30540 if matches!(version, MavlinkVersion::V2) {
30541 let len = __tmp.len();
30542 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30543 } else {
30544 __tmp.len()
30545 }
30546 }
30547}
30548#[doc = "Status of simulation environment, if used."]
30549#[doc = ""]
30550#[doc = "ID: 108"]
30551#[derive(Debug, Clone, PartialEq)]
30552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30554#[cfg_attr(feature = "ts", derive(TS))]
30555#[cfg_attr(feature = "ts", ts(export))]
30556pub struct SIM_STATE_DATA {
30557 #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
30558 pub q1: f32,
30559 #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
30560 pub q2: f32,
30561 #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
30562 pub q3: f32,
30563 #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
30564 pub q4: f32,
30565 #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
30566 pub roll: f32,
30567 #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
30568 pub pitch: f32,
30569 #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
30570 pub yaw: f32,
30571 #[doc = "X acceleration"]
30572 pub xacc: f32,
30573 #[doc = "Y acceleration"]
30574 pub yacc: f32,
30575 #[doc = "Z acceleration"]
30576 pub zacc: f32,
30577 #[doc = "Angular speed around X axis"]
30578 pub xgyro: f32,
30579 #[doc = "Angular speed around Y axis"]
30580 pub ygyro: f32,
30581 #[doc = "Angular speed around Z axis"]
30582 pub zgyro: f32,
30583 #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
30584 pub lat: f32,
30585 #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
30586 pub lon: f32,
30587 #[doc = "Altitude"]
30588 pub alt: f32,
30589 #[doc = "Horizontal position standard deviation"]
30590 pub std_dev_horz: f32,
30591 #[doc = "Vertical position standard deviation"]
30592 pub std_dev_vert: f32,
30593 #[doc = "True velocity in north direction in earth-fixed NED frame"]
30594 pub vn: f32,
30595 #[doc = "True velocity in east direction in earth-fixed NED frame"]
30596 pub ve: f32,
30597 #[doc = "True velocity in down direction in earth-fixed NED frame"]
30598 pub vd: f32,
30599 #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
30600 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30601 pub lat_int: i32,
30602 #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
30603 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30604 pub lon_int: i32,
30605}
30606impl SIM_STATE_DATA {
30607 pub const ENCODED_LEN: usize = 92usize;
30608 pub const DEFAULT: Self = Self {
30609 q1: 0.0_f32,
30610 q2: 0.0_f32,
30611 q3: 0.0_f32,
30612 q4: 0.0_f32,
30613 roll: 0.0_f32,
30614 pitch: 0.0_f32,
30615 yaw: 0.0_f32,
30616 xacc: 0.0_f32,
30617 yacc: 0.0_f32,
30618 zacc: 0.0_f32,
30619 xgyro: 0.0_f32,
30620 ygyro: 0.0_f32,
30621 zgyro: 0.0_f32,
30622 lat: 0.0_f32,
30623 lon: 0.0_f32,
30624 alt: 0.0_f32,
30625 std_dev_horz: 0.0_f32,
30626 std_dev_vert: 0.0_f32,
30627 vn: 0.0_f32,
30628 ve: 0.0_f32,
30629 vd: 0.0_f32,
30630 lat_int: 0_i32,
30631 lon_int: 0_i32,
30632 };
30633 #[cfg(feature = "arbitrary")]
30634 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30635 use arbitrary::{Arbitrary, Unstructured};
30636 let mut buf = [0u8; 1024];
30637 rng.fill_bytes(&mut buf);
30638 let mut unstructured = Unstructured::new(&buf);
30639 Self::arbitrary(&mut unstructured).unwrap_or_default()
30640 }
30641}
30642impl Default for SIM_STATE_DATA {
30643 fn default() -> Self {
30644 Self::DEFAULT.clone()
30645 }
30646}
30647impl MessageData for SIM_STATE_DATA {
30648 type Message = MavMessage;
30649 const ID: u32 = 108u32;
30650 const NAME: &'static str = "SIM_STATE";
30651 const EXTRA_CRC: u8 = 32u8;
30652 const ENCODED_LEN: usize = 92usize;
30653 fn deser(
30654 _version: MavlinkVersion,
30655 __input: &[u8],
30656 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30657 let avail_len = __input.len();
30658 let mut payload_buf = [0; Self::ENCODED_LEN];
30659 let mut buf = if avail_len < Self::ENCODED_LEN {
30660 payload_buf[0..avail_len].copy_from_slice(__input);
30661 Bytes::new(&payload_buf)
30662 } else {
30663 Bytes::new(__input)
30664 };
30665 let mut __struct = Self::default();
30666 __struct.q1 = buf.get_f32_le()?;
30667 __struct.q2 = buf.get_f32_le()?;
30668 __struct.q3 = buf.get_f32_le()?;
30669 __struct.q4 = buf.get_f32_le()?;
30670 __struct.roll = buf.get_f32_le()?;
30671 __struct.pitch = buf.get_f32_le()?;
30672 __struct.yaw = buf.get_f32_le()?;
30673 __struct.xacc = buf.get_f32_le()?;
30674 __struct.yacc = buf.get_f32_le()?;
30675 __struct.zacc = buf.get_f32_le()?;
30676 __struct.xgyro = buf.get_f32_le()?;
30677 __struct.ygyro = buf.get_f32_le()?;
30678 __struct.zgyro = buf.get_f32_le()?;
30679 __struct.lat = buf.get_f32_le()?;
30680 __struct.lon = buf.get_f32_le()?;
30681 __struct.alt = buf.get_f32_le()?;
30682 __struct.std_dev_horz = buf.get_f32_le()?;
30683 __struct.std_dev_vert = buf.get_f32_le()?;
30684 __struct.vn = buf.get_f32_le()?;
30685 __struct.ve = buf.get_f32_le()?;
30686 __struct.vd = buf.get_f32_le()?;
30687 __struct.lat_int = buf.get_i32_le()?;
30688 __struct.lon_int = buf.get_i32_le()?;
30689 Ok(__struct)
30690 }
30691 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30692 let mut __tmp = BytesMut::new(bytes);
30693 #[allow(clippy::absurd_extreme_comparisons)]
30694 #[allow(unused_comparisons)]
30695 if __tmp.remaining() < Self::ENCODED_LEN {
30696 panic!(
30697 "buffer is too small (need {} bytes, but got {})",
30698 Self::ENCODED_LEN,
30699 __tmp.remaining(),
30700 )
30701 }
30702 __tmp.put_f32_le(self.q1);
30703 __tmp.put_f32_le(self.q2);
30704 __tmp.put_f32_le(self.q3);
30705 __tmp.put_f32_le(self.q4);
30706 __tmp.put_f32_le(self.roll);
30707 __tmp.put_f32_le(self.pitch);
30708 __tmp.put_f32_le(self.yaw);
30709 __tmp.put_f32_le(self.xacc);
30710 __tmp.put_f32_le(self.yacc);
30711 __tmp.put_f32_le(self.zacc);
30712 __tmp.put_f32_le(self.xgyro);
30713 __tmp.put_f32_le(self.ygyro);
30714 __tmp.put_f32_le(self.zgyro);
30715 __tmp.put_f32_le(self.lat);
30716 __tmp.put_f32_le(self.lon);
30717 __tmp.put_f32_le(self.alt);
30718 __tmp.put_f32_le(self.std_dev_horz);
30719 __tmp.put_f32_le(self.std_dev_vert);
30720 __tmp.put_f32_le(self.vn);
30721 __tmp.put_f32_le(self.ve);
30722 __tmp.put_f32_le(self.vd);
30723 if matches!(version, MavlinkVersion::V2) {
30724 __tmp.put_i32_le(self.lat_int);
30725 __tmp.put_i32_le(self.lon_int);
30726 let len = __tmp.len();
30727 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30728 } else {
30729 __tmp.len()
30730 }
30731 }
30732}
30733#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
30734#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
30735#[doc = ""]
30736#[doc = "ID: 370"]
30737#[derive(Debug, Clone, PartialEq)]
30738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30740#[cfg_attr(feature = "ts", derive(TS))]
30741#[cfg_attr(feature = "ts", ts(export))]
30742pub struct SMART_BATTERY_INFO_DATA {
30743 #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
30744 pub capacity_full_specification: i32,
30745 #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
30746 pub capacity_full: i32,
30747 #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
30748 pub cycle_count: u16,
30749 #[doc = "Battery weight. 0: field not provided."]
30750 pub weight: u16,
30751 #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
30752 pub discharge_minimum_voltage: u16,
30753 #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
30754 pub charging_minimum_voltage: u16,
30755 #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
30756 pub resting_minimum_voltage: u16,
30757 #[doc = "Battery ID"]
30758 pub id: u8,
30759 #[doc = "Function of the battery"]
30760 pub battery_function: MavBatteryFunction,
30761 #[doc = "Type (chemistry) of the battery"]
30762 pub mavtype: MavBatteryType,
30763 #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
30764 #[cfg_attr(feature = "ts", ts(type = "string"))]
30765 pub serial_number: CharArray<16>,
30766 #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
30767 #[cfg_attr(feature = "ts", ts(type = "string"))]
30768 pub device_name: CharArray<50>,
30769 #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
30770 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30771 pub charging_maximum_voltage: u16,
30772 #[doc = "Number of battery cells in series. 0: field not provided."]
30773 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30774 pub cells_in_series: u8,
30775 #[doc = "Maximum pack discharge current. 0: field not provided."]
30776 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30777 pub discharge_maximum_current: u32,
30778 #[doc = "Maximum pack discharge burst current. 0: field not provided."]
30779 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30780 pub discharge_maximum_burst_current: u32,
30781 #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
30782 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30783 #[cfg_attr(feature = "ts", ts(type = "string"))]
30784 pub manufacture_date: CharArray<11>,
30785}
30786impl SMART_BATTERY_INFO_DATA {
30787 pub const ENCODED_LEN: usize = 109usize;
30788 pub const DEFAULT: Self = Self {
30789 capacity_full_specification: 0_i32,
30790 capacity_full: 0_i32,
30791 cycle_count: 0_u16,
30792 weight: 0_u16,
30793 discharge_minimum_voltage: 0_u16,
30794 charging_minimum_voltage: 0_u16,
30795 resting_minimum_voltage: 0_u16,
30796 id: 0_u8,
30797 battery_function: MavBatteryFunction::DEFAULT,
30798 mavtype: MavBatteryType::DEFAULT,
30799 serial_number: CharArray::new([0_u8; 16usize]),
30800 device_name: CharArray::new([0_u8; 50usize]),
30801 charging_maximum_voltage: 0_u16,
30802 cells_in_series: 0_u8,
30803 discharge_maximum_current: 0_u32,
30804 discharge_maximum_burst_current: 0_u32,
30805 manufacture_date: CharArray::new([0_u8; 11usize]),
30806 };
30807 #[cfg(feature = "arbitrary")]
30808 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30809 use arbitrary::{Arbitrary, Unstructured};
30810 let mut buf = [0u8; 1024];
30811 rng.fill_bytes(&mut buf);
30812 let mut unstructured = Unstructured::new(&buf);
30813 Self::arbitrary(&mut unstructured).unwrap_or_default()
30814 }
30815}
30816impl Default for SMART_BATTERY_INFO_DATA {
30817 fn default() -> Self {
30818 Self::DEFAULT.clone()
30819 }
30820}
30821impl MessageData for SMART_BATTERY_INFO_DATA {
30822 type Message = MavMessage;
30823 const ID: u32 = 370u32;
30824 const NAME: &'static str = "SMART_BATTERY_INFO";
30825 const EXTRA_CRC: u8 = 75u8;
30826 const ENCODED_LEN: usize = 109usize;
30827 fn deser(
30828 _version: MavlinkVersion,
30829 __input: &[u8],
30830 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30831 let avail_len = __input.len();
30832 let mut payload_buf = [0; Self::ENCODED_LEN];
30833 let mut buf = if avail_len < Self::ENCODED_LEN {
30834 payload_buf[0..avail_len].copy_from_slice(__input);
30835 Bytes::new(&payload_buf)
30836 } else {
30837 Bytes::new(__input)
30838 };
30839 let mut __struct = Self::default();
30840 __struct.capacity_full_specification = buf.get_i32_le()?;
30841 __struct.capacity_full = buf.get_i32_le()?;
30842 __struct.cycle_count = buf.get_u16_le()?;
30843 __struct.weight = buf.get_u16_le()?;
30844 __struct.discharge_minimum_voltage = buf.get_u16_le()?;
30845 __struct.charging_minimum_voltage = buf.get_u16_le()?;
30846 __struct.resting_minimum_voltage = buf.get_u16_le()?;
30847 __struct.id = buf.get_u8()?;
30848 let tmp = buf.get_u8()?;
30849 __struct.battery_function =
30850 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30851 enum_type: "MavBatteryFunction",
30852 value: tmp as u64,
30853 })?;
30854 let tmp = buf.get_u8()?;
30855 __struct.mavtype =
30856 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30857 enum_type: "MavBatteryType",
30858 value: tmp as u64,
30859 })?;
30860 let mut tmp = [0_u8; 16usize];
30861 for v in &mut tmp {
30862 *v = buf.get_u8()?;
30863 }
30864 __struct.serial_number = CharArray::new(tmp);
30865 let mut tmp = [0_u8; 50usize];
30866 for v in &mut tmp {
30867 *v = buf.get_u8()?;
30868 }
30869 __struct.device_name = CharArray::new(tmp);
30870 __struct.charging_maximum_voltage = buf.get_u16_le()?;
30871 __struct.cells_in_series = buf.get_u8()?;
30872 __struct.discharge_maximum_current = buf.get_u32_le()?;
30873 __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
30874 let mut tmp = [0_u8; 11usize];
30875 for v in &mut tmp {
30876 *v = buf.get_u8()?;
30877 }
30878 __struct.manufacture_date = CharArray::new(tmp);
30879 Ok(__struct)
30880 }
30881 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30882 let mut __tmp = BytesMut::new(bytes);
30883 #[allow(clippy::absurd_extreme_comparisons)]
30884 #[allow(unused_comparisons)]
30885 if __tmp.remaining() < Self::ENCODED_LEN {
30886 panic!(
30887 "buffer is too small (need {} bytes, but got {})",
30888 Self::ENCODED_LEN,
30889 __tmp.remaining(),
30890 )
30891 }
30892 __tmp.put_i32_le(self.capacity_full_specification);
30893 __tmp.put_i32_le(self.capacity_full);
30894 __tmp.put_u16_le(self.cycle_count);
30895 __tmp.put_u16_le(self.weight);
30896 __tmp.put_u16_le(self.discharge_minimum_voltage);
30897 __tmp.put_u16_le(self.charging_minimum_voltage);
30898 __tmp.put_u16_le(self.resting_minimum_voltage);
30899 __tmp.put_u8(self.id);
30900 __tmp.put_u8(self.battery_function as u8);
30901 __tmp.put_u8(self.mavtype as u8);
30902 for val in &self.serial_number {
30903 __tmp.put_u8(*val);
30904 }
30905 for val in &self.device_name {
30906 __tmp.put_u8(*val);
30907 }
30908 if matches!(version, MavlinkVersion::V2) {
30909 __tmp.put_u16_le(self.charging_maximum_voltage);
30910 __tmp.put_u8(self.cells_in_series);
30911 __tmp.put_u32_le(self.discharge_maximum_current);
30912 __tmp.put_u32_le(self.discharge_maximum_burst_current);
30913 for val in &self.manufacture_date {
30914 __tmp.put_u8(*val);
30915 }
30916 let len = __tmp.len();
30917 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30918 } else {
30919 __tmp.len()
30920 }
30921 }
30922}
30923#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
30924#[doc = ""]
30925#[doc = "ID: 253"]
30926#[derive(Debug, Clone, PartialEq)]
30927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30929#[cfg_attr(feature = "ts", derive(TS))]
30930#[cfg_attr(feature = "ts", ts(export))]
30931pub struct STATUSTEXT_DATA {
30932 #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
30933 pub severity: MavSeverity,
30934 #[doc = "Status text message, without null termination character"]
30935 #[cfg_attr(feature = "ts", ts(type = "string"))]
30936 pub text: CharArray<50>,
30937 #[doc = "Unique (opaque) identifier for this statustext message. May be used to reassemble a logical long-statustext message from a sequence of chunks. A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30938 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30939 pub id: u16,
30940 #[doc = "This chunk's sequence number; indexing is from zero. Any null character in the text field is taken to mean this was the last chunk."]
30941 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30942 pub chunk_seq: u8,
30943}
30944impl STATUSTEXT_DATA {
30945 pub const ENCODED_LEN: usize = 54usize;
30946 pub const DEFAULT: Self = Self {
30947 severity: MavSeverity::DEFAULT,
30948 text: CharArray::new([0_u8; 50usize]),
30949 id: 0_u16,
30950 chunk_seq: 0_u8,
30951 };
30952 #[cfg(feature = "arbitrary")]
30953 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30954 use arbitrary::{Arbitrary, Unstructured};
30955 let mut buf = [0u8; 1024];
30956 rng.fill_bytes(&mut buf);
30957 let mut unstructured = Unstructured::new(&buf);
30958 Self::arbitrary(&mut unstructured).unwrap_or_default()
30959 }
30960}
30961impl Default for STATUSTEXT_DATA {
30962 fn default() -> Self {
30963 Self::DEFAULT.clone()
30964 }
30965}
30966impl MessageData for STATUSTEXT_DATA {
30967 type Message = MavMessage;
30968 const ID: u32 = 253u32;
30969 const NAME: &'static str = "STATUSTEXT";
30970 const EXTRA_CRC: u8 = 83u8;
30971 const ENCODED_LEN: usize = 54usize;
30972 fn deser(
30973 _version: MavlinkVersion,
30974 __input: &[u8],
30975 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30976 let avail_len = __input.len();
30977 let mut payload_buf = [0; Self::ENCODED_LEN];
30978 let mut buf = if avail_len < Self::ENCODED_LEN {
30979 payload_buf[0..avail_len].copy_from_slice(__input);
30980 Bytes::new(&payload_buf)
30981 } else {
30982 Bytes::new(__input)
30983 };
30984 let mut __struct = Self::default();
30985 let tmp = buf.get_u8()?;
30986 __struct.severity =
30987 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30988 enum_type: "MavSeverity",
30989 value: tmp as u64,
30990 })?;
30991 let mut tmp = [0_u8; 50usize];
30992 for v in &mut tmp {
30993 *v = buf.get_u8()?;
30994 }
30995 __struct.text = CharArray::new(tmp);
30996 __struct.id = buf.get_u16_le()?;
30997 __struct.chunk_seq = buf.get_u8()?;
30998 Ok(__struct)
30999 }
31000 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31001 let mut __tmp = BytesMut::new(bytes);
31002 #[allow(clippy::absurd_extreme_comparisons)]
31003 #[allow(unused_comparisons)]
31004 if __tmp.remaining() < Self::ENCODED_LEN {
31005 panic!(
31006 "buffer is too small (need {} bytes, but got {})",
31007 Self::ENCODED_LEN,
31008 __tmp.remaining(),
31009 )
31010 }
31011 __tmp.put_u8(self.severity as u8);
31012 for val in &self.text {
31013 __tmp.put_u8(*val);
31014 }
31015 if matches!(version, MavlinkVersion::V2) {
31016 __tmp.put_u16_le(self.id);
31017 __tmp.put_u8(self.chunk_seq);
31018 let len = __tmp.len();
31019 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31020 } else {
31021 __tmp.len()
31022 }
31023 }
31024}
31025#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
31026#[doc = ""]
31027#[doc = "ID: 261"]
31028#[derive(Debug, Clone, PartialEq)]
31029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31031#[cfg_attr(feature = "ts", derive(TS))]
31032#[cfg_attr(feature = "ts", ts(export))]
31033pub struct STORAGE_INFORMATION_DATA {
31034 #[doc = "Timestamp (time since system boot)."]
31035 pub time_boot_ms: u32,
31036 #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31037 pub total_capacity: f32,
31038 #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31039 pub used_capacity: f32,
31040 #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31041 pub available_capacity: f32,
31042 #[doc = "Read speed."]
31043 pub read_speed: f32,
31044 #[doc = "Write speed."]
31045 pub write_speed: f32,
31046 #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
31047 pub storage_id: u8,
31048 #[doc = "Number of storage devices"]
31049 pub storage_count: u8,
31050 #[doc = "Status of storage"]
31051 pub status: StorageStatus,
31052 #[doc = "Type of storage"]
31053 #[cfg_attr(feature = "serde", serde(default))]
31054 pub mavtype: StorageType,
31055 #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
31056 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31057 #[cfg_attr(feature = "ts", ts(type = "string"))]
31058 pub name: CharArray<32>,
31059 #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc. Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
31060 #[cfg_attr(feature = "serde", serde(default))]
31061 pub storage_usage: StorageUsageFlag,
31062}
31063impl STORAGE_INFORMATION_DATA {
31064 pub const ENCODED_LEN: usize = 61usize;
31065 pub const DEFAULT: Self = Self {
31066 time_boot_ms: 0_u32,
31067 total_capacity: 0.0_f32,
31068 used_capacity: 0.0_f32,
31069 available_capacity: 0.0_f32,
31070 read_speed: 0.0_f32,
31071 write_speed: 0.0_f32,
31072 storage_id: 0_u8,
31073 storage_count: 0_u8,
31074 status: StorageStatus::DEFAULT,
31075 mavtype: StorageType::DEFAULT,
31076 name: CharArray::new([0_u8; 32usize]),
31077 storage_usage: StorageUsageFlag::DEFAULT,
31078 };
31079 #[cfg(feature = "arbitrary")]
31080 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31081 use arbitrary::{Arbitrary, Unstructured};
31082 let mut buf = [0u8; 1024];
31083 rng.fill_bytes(&mut buf);
31084 let mut unstructured = Unstructured::new(&buf);
31085 Self::arbitrary(&mut unstructured).unwrap_or_default()
31086 }
31087}
31088impl Default for STORAGE_INFORMATION_DATA {
31089 fn default() -> Self {
31090 Self::DEFAULT.clone()
31091 }
31092}
31093impl MessageData for STORAGE_INFORMATION_DATA {
31094 type Message = MavMessage;
31095 const ID: u32 = 261u32;
31096 const NAME: &'static str = "STORAGE_INFORMATION";
31097 const EXTRA_CRC: u8 = 179u8;
31098 const ENCODED_LEN: usize = 61usize;
31099 fn deser(
31100 _version: MavlinkVersion,
31101 __input: &[u8],
31102 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31103 let avail_len = __input.len();
31104 let mut payload_buf = [0; Self::ENCODED_LEN];
31105 let mut buf = if avail_len < Self::ENCODED_LEN {
31106 payload_buf[0..avail_len].copy_from_slice(__input);
31107 Bytes::new(&payload_buf)
31108 } else {
31109 Bytes::new(__input)
31110 };
31111 let mut __struct = Self::default();
31112 __struct.time_boot_ms = buf.get_u32_le()?;
31113 __struct.total_capacity = buf.get_f32_le()?;
31114 __struct.used_capacity = buf.get_f32_le()?;
31115 __struct.available_capacity = buf.get_f32_le()?;
31116 __struct.read_speed = buf.get_f32_le()?;
31117 __struct.write_speed = buf.get_f32_le()?;
31118 __struct.storage_id = buf.get_u8()?;
31119 __struct.storage_count = buf.get_u8()?;
31120 let tmp = buf.get_u8()?;
31121 __struct.status =
31122 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31123 enum_type: "StorageStatus",
31124 value: tmp as u64,
31125 })?;
31126 let tmp = buf.get_u8()?;
31127 __struct.mavtype =
31128 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31129 enum_type: "StorageType",
31130 value: tmp as u64,
31131 })?;
31132 let mut tmp = [0_u8; 32usize];
31133 for v in &mut tmp {
31134 *v = buf.get_u8()?;
31135 }
31136 __struct.name = CharArray::new(tmp);
31137 let tmp = buf.get_u8()?;
31138 __struct.storage_usage = StorageUsageFlag::from_bits(
31139 tmp as <StorageUsageFlag as Flags>::Bits,
31140 )
31141 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31142 flag_type: "StorageUsageFlag",
31143 value: tmp as u64,
31144 })?;
31145 Ok(__struct)
31146 }
31147 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31148 let mut __tmp = BytesMut::new(bytes);
31149 #[allow(clippy::absurd_extreme_comparisons)]
31150 #[allow(unused_comparisons)]
31151 if __tmp.remaining() < Self::ENCODED_LEN {
31152 panic!(
31153 "buffer is too small (need {} bytes, but got {})",
31154 Self::ENCODED_LEN,
31155 __tmp.remaining(),
31156 )
31157 }
31158 __tmp.put_u32_le(self.time_boot_ms);
31159 __tmp.put_f32_le(self.total_capacity);
31160 __tmp.put_f32_le(self.used_capacity);
31161 __tmp.put_f32_le(self.available_capacity);
31162 __tmp.put_f32_le(self.read_speed);
31163 __tmp.put_f32_le(self.write_speed);
31164 __tmp.put_u8(self.storage_id);
31165 __tmp.put_u8(self.storage_count);
31166 __tmp.put_u8(self.status as u8);
31167 if matches!(version, MavlinkVersion::V2) {
31168 __tmp.put_u8(self.mavtype as u8);
31169 for val in &self.name {
31170 __tmp.put_u8(*val);
31171 }
31172 __tmp.put_u8(self.storage_usage.bits() as u8);
31173 let len = __tmp.len();
31174 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31175 } else {
31176 __tmp.len()
31177 }
31178 }
31179}
31180#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31181#[doc = ""]
31182#[doc = "ID: 401"]
31183#[derive(Debug, Clone, PartialEq)]
31184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31186#[cfg_attr(feature = "ts", derive(TS))]
31187#[cfg_attr(feature = "ts", ts(export))]
31188pub struct SUPPORTED_TUNES_DATA {
31189 #[doc = "Bitfield of supported tune formats."]
31190 pub format: TuneFormat,
31191 #[doc = "System ID"]
31192 pub target_system: u8,
31193 #[doc = "Component ID"]
31194 pub target_component: u8,
31195}
31196impl SUPPORTED_TUNES_DATA {
31197 pub const ENCODED_LEN: usize = 6usize;
31198 pub const DEFAULT: Self = Self {
31199 format: TuneFormat::DEFAULT,
31200 target_system: 0_u8,
31201 target_component: 0_u8,
31202 };
31203 #[cfg(feature = "arbitrary")]
31204 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31205 use arbitrary::{Arbitrary, Unstructured};
31206 let mut buf = [0u8; 1024];
31207 rng.fill_bytes(&mut buf);
31208 let mut unstructured = Unstructured::new(&buf);
31209 Self::arbitrary(&mut unstructured).unwrap_or_default()
31210 }
31211}
31212impl Default for SUPPORTED_TUNES_DATA {
31213 fn default() -> Self {
31214 Self::DEFAULT.clone()
31215 }
31216}
31217impl MessageData for SUPPORTED_TUNES_DATA {
31218 type Message = MavMessage;
31219 const ID: u32 = 401u32;
31220 const NAME: &'static str = "SUPPORTED_TUNES";
31221 const EXTRA_CRC: u8 = 183u8;
31222 const ENCODED_LEN: usize = 6usize;
31223 fn deser(
31224 _version: MavlinkVersion,
31225 __input: &[u8],
31226 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31227 let avail_len = __input.len();
31228 let mut payload_buf = [0; Self::ENCODED_LEN];
31229 let mut buf = if avail_len < Self::ENCODED_LEN {
31230 payload_buf[0..avail_len].copy_from_slice(__input);
31231 Bytes::new(&payload_buf)
31232 } else {
31233 Bytes::new(__input)
31234 };
31235 let mut __struct = Self::default();
31236 let tmp = buf.get_u32_le()?;
31237 __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31238 ::mavlink_core::error::ParserError::InvalidEnum {
31239 enum_type: "TuneFormat",
31240 value: tmp as u64,
31241 },
31242 )?;
31243 __struct.target_system = buf.get_u8()?;
31244 __struct.target_component = buf.get_u8()?;
31245 Ok(__struct)
31246 }
31247 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31248 let mut __tmp = BytesMut::new(bytes);
31249 #[allow(clippy::absurd_extreme_comparisons)]
31250 #[allow(unused_comparisons)]
31251 if __tmp.remaining() < Self::ENCODED_LEN {
31252 panic!(
31253 "buffer is too small (need {} bytes, but got {})",
31254 Self::ENCODED_LEN,
31255 __tmp.remaining(),
31256 )
31257 }
31258 __tmp.put_u32_le(self.format as u32);
31259 __tmp.put_u8(self.target_system);
31260 __tmp.put_u8(self.target_component);
31261 if matches!(version, MavlinkVersion::V2) {
31262 let len = __tmp.len();
31263 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31264 } else {
31265 __tmp.len()
31266 }
31267 }
31268}
31269#[doc = "The system time is the time of the master clock. This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network. Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time. This allows more broadly accurate date stamping of logs, and so on. If precise time synchronization is needed then use TIMESYNC instead."]
31270#[doc = ""]
31271#[doc = "ID: 2"]
31272#[derive(Debug, Clone, PartialEq)]
31273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31275#[cfg_attr(feature = "ts", derive(TS))]
31276#[cfg_attr(feature = "ts", ts(export))]
31277pub struct SYSTEM_TIME_DATA {
31278 #[doc = "Timestamp (UNIX epoch time)."]
31279 pub time_unix_usec: u64,
31280 #[doc = "Timestamp (time since system boot)."]
31281 pub time_boot_ms: u32,
31282}
31283impl SYSTEM_TIME_DATA {
31284 pub const ENCODED_LEN: usize = 12usize;
31285 pub const DEFAULT: Self = Self {
31286 time_unix_usec: 0_u64,
31287 time_boot_ms: 0_u32,
31288 };
31289 #[cfg(feature = "arbitrary")]
31290 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31291 use arbitrary::{Arbitrary, Unstructured};
31292 let mut buf = [0u8; 1024];
31293 rng.fill_bytes(&mut buf);
31294 let mut unstructured = Unstructured::new(&buf);
31295 Self::arbitrary(&mut unstructured).unwrap_or_default()
31296 }
31297}
31298impl Default for SYSTEM_TIME_DATA {
31299 fn default() -> Self {
31300 Self::DEFAULT.clone()
31301 }
31302}
31303impl MessageData for SYSTEM_TIME_DATA {
31304 type Message = MavMessage;
31305 const ID: u32 = 2u32;
31306 const NAME: &'static str = "SYSTEM_TIME";
31307 const EXTRA_CRC: u8 = 137u8;
31308 const ENCODED_LEN: usize = 12usize;
31309 fn deser(
31310 _version: MavlinkVersion,
31311 __input: &[u8],
31312 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31313 let avail_len = __input.len();
31314 let mut payload_buf = [0; Self::ENCODED_LEN];
31315 let mut buf = if avail_len < Self::ENCODED_LEN {
31316 payload_buf[0..avail_len].copy_from_slice(__input);
31317 Bytes::new(&payload_buf)
31318 } else {
31319 Bytes::new(__input)
31320 };
31321 let mut __struct = Self::default();
31322 __struct.time_unix_usec = buf.get_u64_le()?;
31323 __struct.time_boot_ms = buf.get_u32_le()?;
31324 Ok(__struct)
31325 }
31326 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31327 let mut __tmp = BytesMut::new(bytes);
31328 #[allow(clippy::absurd_extreme_comparisons)]
31329 #[allow(unused_comparisons)]
31330 if __tmp.remaining() < Self::ENCODED_LEN {
31331 panic!(
31332 "buffer is too small (need {} bytes, but got {})",
31333 Self::ENCODED_LEN,
31334 __tmp.remaining(),
31335 )
31336 }
31337 __tmp.put_u64_le(self.time_unix_usec);
31338 __tmp.put_u32_le(self.time_boot_ms);
31339 if matches!(version, MavlinkVersion::V2) {
31340 let len = __tmp.len();
31341 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31342 } else {
31343 __tmp.len()
31344 }
31345 }
31346}
31347#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
31348#[doc = ""]
31349#[doc = "ID: 1"]
31350#[derive(Debug, Clone, PartialEq)]
31351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31353#[cfg_attr(feature = "ts", derive(TS))]
31354#[cfg_attr(feature = "ts", ts(export))]
31355pub struct SYS_STATUS_DATA {
31356 #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31357 pub onboard_control_sensors_present: MavSysStatusSensor,
31358 #[doc = "Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled."]
31359 pub onboard_control_sensors_enabled: MavSysStatusSensor,
31360 #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31361 pub onboard_control_sensors_health: MavSysStatusSensor,
31362 #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31363 pub load: u16,
31364 #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31365 pub voltage_battery: u16,
31366 #[doc = "Battery current, -1: Current not sent by autopilot"]
31367 pub current_battery: i16,
31368 #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31369 pub drop_rate_comm: u16,
31370 #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31371 pub errors_comm: u16,
31372 #[doc = "Autopilot-specific errors"]
31373 pub errors_count1: u16,
31374 #[doc = "Autopilot-specific errors"]
31375 pub errors_count2: u16,
31376 #[doc = "Autopilot-specific errors"]
31377 pub errors_count3: u16,
31378 #[doc = "Autopilot-specific errors"]
31379 pub errors_count4: u16,
31380 #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31381 pub battery_remaining: i8,
31382 #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31383 #[cfg_attr(feature = "serde", serde(default))]
31384 pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31385 #[doc = "Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled."]
31386 #[cfg_attr(feature = "serde", serde(default))]
31387 pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31388 #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31389 #[cfg_attr(feature = "serde", serde(default))]
31390 pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31391}
31392impl SYS_STATUS_DATA {
31393 pub const ENCODED_LEN: usize = 43usize;
31394 pub const DEFAULT: Self = Self {
31395 onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31396 onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31397 onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31398 load: 0_u16,
31399 voltage_battery: 0_u16,
31400 current_battery: 0_i16,
31401 drop_rate_comm: 0_u16,
31402 errors_comm: 0_u16,
31403 errors_count1: 0_u16,
31404 errors_count2: 0_u16,
31405 errors_count3: 0_u16,
31406 errors_count4: 0_u16,
31407 battery_remaining: 0_i8,
31408 onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31409 onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31410 onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31411 };
31412 #[cfg(feature = "arbitrary")]
31413 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31414 use arbitrary::{Arbitrary, Unstructured};
31415 let mut buf = [0u8; 1024];
31416 rng.fill_bytes(&mut buf);
31417 let mut unstructured = Unstructured::new(&buf);
31418 Self::arbitrary(&mut unstructured).unwrap_or_default()
31419 }
31420}
31421impl Default for SYS_STATUS_DATA {
31422 fn default() -> Self {
31423 Self::DEFAULT.clone()
31424 }
31425}
31426impl MessageData for SYS_STATUS_DATA {
31427 type Message = MavMessage;
31428 const ID: u32 = 1u32;
31429 const NAME: &'static str = "SYS_STATUS";
31430 const EXTRA_CRC: u8 = 124u8;
31431 const ENCODED_LEN: usize = 43usize;
31432 fn deser(
31433 _version: MavlinkVersion,
31434 __input: &[u8],
31435 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31436 let avail_len = __input.len();
31437 let mut payload_buf = [0; Self::ENCODED_LEN];
31438 let mut buf = if avail_len < Self::ENCODED_LEN {
31439 payload_buf[0..avail_len].copy_from_slice(__input);
31440 Bytes::new(&payload_buf)
31441 } else {
31442 Bytes::new(__input)
31443 };
31444 let mut __struct = Self::default();
31445 let tmp = buf.get_u32_le()?;
31446 __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
31447 tmp as <MavSysStatusSensor as Flags>::Bits,
31448 )
31449 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31450 flag_type: "MavSysStatusSensor",
31451 value: tmp as u64,
31452 })?;
31453 let tmp = buf.get_u32_le()?;
31454 __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
31455 tmp as <MavSysStatusSensor as Flags>::Bits,
31456 )
31457 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31458 flag_type: "MavSysStatusSensor",
31459 value: tmp as u64,
31460 })?;
31461 let tmp = buf.get_u32_le()?;
31462 __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
31463 tmp as <MavSysStatusSensor as Flags>::Bits,
31464 )
31465 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31466 flag_type: "MavSysStatusSensor",
31467 value: tmp as u64,
31468 })?;
31469 __struct.load = buf.get_u16_le()?;
31470 __struct.voltage_battery = buf.get_u16_le()?;
31471 __struct.current_battery = buf.get_i16_le()?;
31472 __struct.drop_rate_comm = buf.get_u16_le()?;
31473 __struct.errors_comm = buf.get_u16_le()?;
31474 __struct.errors_count1 = buf.get_u16_le()?;
31475 __struct.errors_count2 = buf.get_u16_le()?;
31476 __struct.errors_count3 = buf.get_u16_le()?;
31477 __struct.errors_count4 = buf.get_u16_le()?;
31478 __struct.battery_remaining = buf.get_i8()?;
31479 let tmp = buf.get_u32_le()?;
31480 __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
31481 tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31482 )
31483 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31484 flag_type: "MavSysStatusSensorExtended",
31485 value: tmp as u64,
31486 })?;
31487 let tmp = buf.get_u32_le()?;
31488 __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
31489 tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31490 )
31491 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31492 flag_type: "MavSysStatusSensorExtended",
31493 value: tmp as u64,
31494 })?;
31495 let tmp = buf.get_u32_le()?;
31496 __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
31497 tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31498 )
31499 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31500 flag_type: "MavSysStatusSensorExtended",
31501 value: tmp as u64,
31502 })?;
31503 Ok(__struct)
31504 }
31505 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31506 let mut __tmp = BytesMut::new(bytes);
31507 #[allow(clippy::absurd_extreme_comparisons)]
31508 #[allow(unused_comparisons)]
31509 if __tmp.remaining() < Self::ENCODED_LEN {
31510 panic!(
31511 "buffer is too small (need {} bytes, but got {})",
31512 Self::ENCODED_LEN,
31513 __tmp.remaining(),
31514 )
31515 }
31516 __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
31517 __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
31518 __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
31519 __tmp.put_u16_le(self.load);
31520 __tmp.put_u16_le(self.voltage_battery);
31521 __tmp.put_i16_le(self.current_battery);
31522 __tmp.put_u16_le(self.drop_rate_comm);
31523 __tmp.put_u16_le(self.errors_comm);
31524 __tmp.put_u16_le(self.errors_count1);
31525 __tmp.put_u16_le(self.errors_count2);
31526 __tmp.put_u16_le(self.errors_count3);
31527 __tmp.put_u16_le(self.errors_count4);
31528 __tmp.put_i8(self.battery_remaining);
31529 if matches!(version, MavlinkVersion::V2) {
31530 __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
31531 __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
31532 __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
31533 let len = __tmp.len();
31534 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31535 } else {
31536 __tmp.len()
31537 }
31538 }
31539}
31540#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31541#[doc = ""]
31542#[doc = "ID: 135"]
31543#[derive(Debug, Clone, PartialEq)]
31544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31545#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31546#[cfg_attr(feature = "ts", derive(TS))]
31547#[cfg_attr(feature = "ts", ts(export))]
31548pub struct TERRAIN_CHECK_DATA {
31549 #[doc = "Latitude"]
31550 pub lat: i32,
31551 #[doc = "Longitude"]
31552 pub lon: i32,
31553}
31554impl TERRAIN_CHECK_DATA {
31555 pub const ENCODED_LEN: usize = 8usize;
31556 pub const DEFAULT: Self = Self {
31557 lat: 0_i32,
31558 lon: 0_i32,
31559 };
31560 #[cfg(feature = "arbitrary")]
31561 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31562 use arbitrary::{Arbitrary, Unstructured};
31563 let mut buf = [0u8; 1024];
31564 rng.fill_bytes(&mut buf);
31565 let mut unstructured = Unstructured::new(&buf);
31566 Self::arbitrary(&mut unstructured).unwrap_or_default()
31567 }
31568}
31569impl Default for TERRAIN_CHECK_DATA {
31570 fn default() -> Self {
31571 Self::DEFAULT.clone()
31572 }
31573}
31574impl MessageData for TERRAIN_CHECK_DATA {
31575 type Message = MavMessage;
31576 const ID: u32 = 135u32;
31577 const NAME: &'static str = "TERRAIN_CHECK";
31578 const EXTRA_CRC: u8 = 203u8;
31579 const ENCODED_LEN: usize = 8usize;
31580 fn deser(
31581 _version: MavlinkVersion,
31582 __input: &[u8],
31583 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31584 let avail_len = __input.len();
31585 let mut payload_buf = [0; Self::ENCODED_LEN];
31586 let mut buf = if avail_len < Self::ENCODED_LEN {
31587 payload_buf[0..avail_len].copy_from_slice(__input);
31588 Bytes::new(&payload_buf)
31589 } else {
31590 Bytes::new(__input)
31591 };
31592 let mut __struct = Self::default();
31593 __struct.lat = buf.get_i32_le()?;
31594 __struct.lon = buf.get_i32_le()?;
31595 Ok(__struct)
31596 }
31597 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31598 let mut __tmp = BytesMut::new(bytes);
31599 #[allow(clippy::absurd_extreme_comparisons)]
31600 #[allow(unused_comparisons)]
31601 if __tmp.remaining() < Self::ENCODED_LEN {
31602 panic!(
31603 "buffer is too small (need {} bytes, but got {})",
31604 Self::ENCODED_LEN,
31605 __tmp.remaining(),
31606 )
31607 }
31608 __tmp.put_i32_le(self.lat);
31609 __tmp.put_i32_le(self.lon);
31610 if matches!(version, MavlinkVersion::V2) {
31611 let len = __tmp.len();
31612 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31613 } else {
31614 __tmp.len()
31615 }
31616 }
31617}
31618#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31619#[doc = ""]
31620#[doc = "ID: 134"]
31621#[derive(Debug, Clone, PartialEq)]
31622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31624#[cfg_attr(feature = "ts", derive(TS))]
31625#[cfg_attr(feature = "ts", ts(export))]
31626pub struct TERRAIN_DATA_DATA {
31627 #[doc = "Latitude of SW corner of first grid"]
31628 pub lat: i32,
31629 #[doc = "Longitude of SW corner of first grid"]
31630 pub lon: i32,
31631 #[doc = "Grid spacing"]
31632 pub grid_spacing: u16,
31633 #[doc = "Terrain data MSL"]
31634 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31635 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31636 pub data: [i16; 16],
31637 #[doc = "bit within the terrain request mask"]
31638 pub gridbit: u8,
31639}
31640impl TERRAIN_DATA_DATA {
31641 pub const ENCODED_LEN: usize = 43usize;
31642 pub const DEFAULT: Self = Self {
31643 lat: 0_i32,
31644 lon: 0_i32,
31645 grid_spacing: 0_u16,
31646 data: [0_i16; 16usize],
31647 gridbit: 0_u8,
31648 };
31649 #[cfg(feature = "arbitrary")]
31650 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31651 use arbitrary::{Arbitrary, Unstructured};
31652 let mut buf = [0u8; 1024];
31653 rng.fill_bytes(&mut buf);
31654 let mut unstructured = Unstructured::new(&buf);
31655 Self::arbitrary(&mut unstructured).unwrap_or_default()
31656 }
31657}
31658impl Default for TERRAIN_DATA_DATA {
31659 fn default() -> Self {
31660 Self::DEFAULT.clone()
31661 }
31662}
31663impl MessageData for TERRAIN_DATA_DATA {
31664 type Message = MavMessage;
31665 const ID: u32 = 134u32;
31666 const NAME: &'static str = "TERRAIN_DATA";
31667 const EXTRA_CRC: u8 = 229u8;
31668 const ENCODED_LEN: usize = 43usize;
31669 fn deser(
31670 _version: MavlinkVersion,
31671 __input: &[u8],
31672 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31673 let avail_len = __input.len();
31674 let mut payload_buf = [0; Self::ENCODED_LEN];
31675 let mut buf = if avail_len < Self::ENCODED_LEN {
31676 payload_buf[0..avail_len].copy_from_slice(__input);
31677 Bytes::new(&payload_buf)
31678 } else {
31679 Bytes::new(__input)
31680 };
31681 let mut __struct = Self::default();
31682 __struct.lat = buf.get_i32_le()?;
31683 __struct.lon = buf.get_i32_le()?;
31684 __struct.grid_spacing = buf.get_u16_le()?;
31685 for v in &mut __struct.data {
31686 let val = buf.get_i16_le()?;
31687 *v = val;
31688 }
31689 __struct.gridbit = buf.get_u8()?;
31690 Ok(__struct)
31691 }
31692 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31693 let mut __tmp = BytesMut::new(bytes);
31694 #[allow(clippy::absurd_extreme_comparisons)]
31695 #[allow(unused_comparisons)]
31696 if __tmp.remaining() < Self::ENCODED_LEN {
31697 panic!(
31698 "buffer is too small (need {} bytes, but got {})",
31699 Self::ENCODED_LEN,
31700 __tmp.remaining(),
31701 )
31702 }
31703 __tmp.put_i32_le(self.lat);
31704 __tmp.put_i32_le(self.lon);
31705 __tmp.put_u16_le(self.grid_spacing);
31706 for val in &self.data {
31707 __tmp.put_i16_le(*val);
31708 }
31709 __tmp.put_u8(self.gridbit);
31710 if matches!(version, MavlinkVersion::V2) {
31711 let len = __tmp.len();
31712 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31713 } else {
31714 __tmp.len()
31715 }
31716 }
31717}
31718#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31719#[doc = ""]
31720#[doc = "ID: 136"]
31721#[derive(Debug, Clone, PartialEq)]
31722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31724#[cfg_attr(feature = "ts", derive(TS))]
31725#[cfg_attr(feature = "ts", ts(export))]
31726pub struct TERRAIN_REPORT_DATA {
31727 #[doc = "Latitude"]
31728 pub lat: i32,
31729 #[doc = "Longitude"]
31730 pub lon: i32,
31731 #[doc = "Terrain height MSL"]
31732 pub terrain_height: f32,
31733 #[doc = "Current vehicle height above lat/lon terrain height"]
31734 pub current_height: f32,
31735 #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31736 pub spacing: u16,
31737 #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31738 pub pending: u16,
31739 #[doc = "Number of 4x4 terrain blocks in memory"]
31740 pub loaded: u16,
31741}
31742impl TERRAIN_REPORT_DATA {
31743 pub const ENCODED_LEN: usize = 22usize;
31744 pub const DEFAULT: Self = Self {
31745 lat: 0_i32,
31746 lon: 0_i32,
31747 terrain_height: 0.0_f32,
31748 current_height: 0.0_f32,
31749 spacing: 0_u16,
31750 pending: 0_u16,
31751 loaded: 0_u16,
31752 };
31753 #[cfg(feature = "arbitrary")]
31754 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31755 use arbitrary::{Arbitrary, Unstructured};
31756 let mut buf = [0u8; 1024];
31757 rng.fill_bytes(&mut buf);
31758 let mut unstructured = Unstructured::new(&buf);
31759 Self::arbitrary(&mut unstructured).unwrap_or_default()
31760 }
31761}
31762impl Default for TERRAIN_REPORT_DATA {
31763 fn default() -> Self {
31764 Self::DEFAULT.clone()
31765 }
31766}
31767impl MessageData for TERRAIN_REPORT_DATA {
31768 type Message = MavMessage;
31769 const ID: u32 = 136u32;
31770 const NAME: &'static str = "TERRAIN_REPORT";
31771 const EXTRA_CRC: u8 = 1u8;
31772 const ENCODED_LEN: usize = 22usize;
31773 fn deser(
31774 _version: MavlinkVersion,
31775 __input: &[u8],
31776 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31777 let avail_len = __input.len();
31778 let mut payload_buf = [0; Self::ENCODED_LEN];
31779 let mut buf = if avail_len < Self::ENCODED_LEN {
31780 payload_buf[0..avail_len].copy_from_slice(__input);
31781 Bytes::new(&payload_buf)
31782 } else {
31783 Bytes::new(__input)
31784 };
31785 let mut __struct = Self::default();
31786 __struct.lat = buf.get_i32_le()?;
31787 __struct.lon = buf.get_i32_le()?;
31788 __struct.terrain_height = buf.get_f32_le()?;
31789 __struct.current_height = buf.get_f32_le()?;
31790 __struct.spacing = buf.get_u16_le()?;
31791 __struct.pending = buf.get_u16_le()?;
31792 __struct.loaded = buf.get_u16_le()?;
31793 Ok(__struct)
31794 }
31795 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31796 let mut __tmp = BytesMut::new(bytes);
31797 #[allow(clippy::absurd_extreme_comparisons)]
31798 #[allow(unused_comparisons)]
31799 if __tmp.remaining() < Self::ENCODED_LEN {
31800 panic!(
31801 "buffer is too small (need {} bytes, but got {})",
31802 Self::ENCODED_LEN,
31803 __tmp.remaining(),
31804 )
31805 }
31806 __tmp.put_i32_le(self.lat);
31807 __tmp.put_i32_le(self.lon);
31808 __tmp.put_f32_le(self.terrain_height);
31809 __tmp.put_f32_le(self.current_height);
31810 __tmp.put_u16_le(self.spacing);
31811 __tmp.put_u16_le(self.pending);
31812 __tmp.put_u16_le(self.loaded);
31813 if matches!(version, MavlinkVersion::V2) {
31814 let len = __tmp.len();
31815 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31816 } else {
31817 __tmp.len()
31818 }
31819 }
31820}
31821#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31822#[doc = ""]
31823#[doc = "ID: 133"]
31824#[derive(Debug, Clone, PartialEq)]
31825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31827#[cfg_attr(feature = "ts", derive(TS))]
31828#[cfg_attr(feature = "ts", ts(export))]
31829pub struct TERRAIN_REQUEST_DATA {
31830 #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31831 pub mask: u64,
31832 #[doc = "Latitude of SW corner of first grid"]
31833 pub lat: i32,
31834 #[doc = "Longitude of SW corner of first grid"]
31835 pub lon: i32,
31836 #[doc = "Grid spacing"]
31837 pub grid_spacing: u16,
31838}
31839impl TERRAIN_REQUEST_DATA {
31840 pub const ENCODED_LEN: usize = 18usize;
31841 pub const DEFAULT: Self = Self {
31842 mask: 0_u64,
31843 lat: 0_i32,
31844 lon: 0_i32,
31845 grid_spacing: 0_u16,
31846 };
31847 #[cfg(feature = "arbitrary")]
31848 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31849 use arbitrary::{Arbitrary, Unstructured};
31850 let mut buf = [0u8; 1024];
31851 rng.fill_bytes(&mut buf);
31852 let mut unstructured = Unstructured::new(&buf);
31853 Self::arbitrary(&mut unstructured).unwrap_or_default()
31854 }
31855}
31856impl Default for TERRAIN_REQUEST_DATA {
31857 fn default() -> Self {
31858 Self::DEFAULT.clone()
31859 }
31860}
31861impl MessageData for TERRAIN_REQUEST_DATA {
31862 type Message = MavMessage;
31863 const ID: u32 = 133u32;
31864 const NAME: &'static str = "TERRAIN_REQUEST";
31865 const EXTRA_CRC: u8 = 6u8;
31866 const ENCODED_LEN: usize = 18usize;
31867 fn deser(
31868 _version: MavlinkVersion,
31869 __input: &[u8],
31870 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31871 let avail_len = __input.len();
31872 let mut payload_buf = [0; Self::ENCODED_LEN];
31873 let mut buf = if avail_len < Self::ENCODED_LEN {
31874 payload_buf[0..avail_len].copy_from_slice(__input);
31875 Bytes::new(&payload_buf)
31876 } else {
31877 Bytes::new(__input)
31878 };
31879 let mut __struct = Self::default();
31880 __struct.mask = buf.get_u64_le()?;
31881 __struct.lat = buf.get_i32_le()?;
31882 __struct.lon = buf.get_i32_le()?;
31883 __struct.grid_spacing = buf.get_u16_le()?;
31884 Ok(__struct)
31885 }
31886 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31887 let mut __tmp = BytesMut::new(bytes);
31888 #[allow(clippy::absurd_extreme_comparisons)]
31889 #[allow(unused_comparisons)]
31890 if __tmp.remaining() < Self::ENCODED_LEN {
31891 panic!(
31892 "buffer is too small (need {} bytes, but got {})",
31893 Self::ENCODED_LEN,
31894 __tmp.remaining(),
31895 )
31896 }
31897 __tmp.put_u64_le(self.mask);
31898 __tmp.put_i32_le(self.lat);
31899 __tmp.put_i32_le(self.lon);
31900 __tmp.put_u16_le(self.grid_spacing);
31901 if matches!(version, MavlinkVersion::V2) {
31902 let len = __tmp.len();
31903 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31904 } else {
31905 __tmp.len()
31906 }
31907 }
31908}
31909#[doc = "Time synchronization message. The message is used for both timesync requests and responses. The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component. The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request. Systems can determine if they are receiving a request or response based on the value of `tc`. If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error. Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used). The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset. See also: <https://mavlink.io/en/services/timesync.html>."]
31910#[doc = ""]
31911#[doc = "ID: 111"]
31912#[derive(Debug, Clone, PartialEq)]
31913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31915#[cfg_attr(feature = "ts", derive(TS))]
31916#[cfg_attr(feature = "ts", ts(export))]
31917pub struct TIMESYNC_DATA {
31918 #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31919 pub tc1: i64,
31920 #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31921 pub ts1: i64,
31922 #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31923 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31924 pub target_system: u8,
31925 #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31926 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31927 pub target_component: u8,
31928}
31929impl TIMESYNC_DATA {
31930 pub const ENCODED_LEN: usize = 18usize;
31931 pub const DEFAULT: Self = Self {
31932 tc1: 0_i64,
31933 ts1: 0_i64,
31934 target_system: 0_u8,
31935 target_component: 0_u8,
31936 };
31937 #[cfg(feature = "arbitrary")]
31938 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31939 use arbitrary::{Arbitrary, Unstructured};
31940 let mut buf = [0u8; 1024];
31941 rng.fill_bytes(&mut buf);
31942 let mut unstructured = Unstructured::new(&buf);
31943 Self::arbitrary(&mut unstructured).unwrap_or_default()
31944 }
31945}
31946impl Default for TIMESYNC_DATA {
31947 fn default() -> Self {
31948 Self::DEFAULT.clone()
31949 }
31950}
31951impl MessageData for TIMESYNC_DATA {
31952 type Message = MavMessage;
31953 const ID: u32 = 111u32;
31954 const NAME: &'static str = "TIMESYNC";
31955 const EXTRA_CRC: u8 = 34u8;
31956 const ENCODED_LEN: usize = 18usize;
31957 fn deser(
31958 _version: MavlinkVersion,
31959 __input: &[u8],
31960 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31961 let avail_len = __input.len();
31962 let mut payload_buf = [0; Self::ENCODED_LEN];
31963 let mut buf = if avail_len < Self::ENCODED_LEN {
31964 payload_buf[0..avail_len].copy_from_slice(__input);
31965 Bytes::new(&payload_buf)
31966 } else {
31967 Bytes::new(__input)
31968 };
31969 let mut __struct = Self::default();
31970 __struct.tc1 = buf.get_i64_le()?;
31971 __struct.ts1 = buf.get_i64_le()?;
31972 __struct.target_system = buf.get_u8()?;
31973 __struct.target_component = buf.get_u8()?;
31974 Ok(__struct)
31975 }
31976 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31977 let mut __tmp = BytesMut::new(bytes);
31978 #[allow(clippy::absurd_extreme_comparisons)]
31979 #[allow(unused_comparisons)]
31980 if __tmp.remaining() < Self::ENCODED_LEN {
31981 panic!(
31982 "buffer is too small (need {} bytes, but got {})",
31983 Self::ENCODED_LEN,
31984 __tmp.remaining(),
31985 )
31986 }
31987 __tmp.put_i64_le(self.tc1);
31988 __tmp.put_i64_le(self.ts1);
31989 if matches!(version, MavlinkVersion::V2) {
31990 __tmp.put_u8(self.target_system);
31991 __tmp.put_u8(self.target_component);
31992 let len = __tmp.len();
31993 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31994 } else {
31995 __tmp.len()
31996 }
31997 }
31998}
31999#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
32000#[doc = ""]
32001#[doc = "ID: 380"]
32002#[derive(Debug, Clone, PartialEq)]
32003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32005#[cfg_attr(feature = "ts", derive(TS))]
32006#[cfg_attr(feature = "ts", ts(export))]
32007pub struct TIME_ESTIMATE_TO_TARGET_DATA {
32008 #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
32009 pub safe_return: i32,
32010 #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
32011 pub land: i32,
32012 #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
32013 pub mission_next_item: i32,
32014 #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
32015 pub mission_end: i32,
32016 #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
32017 pub commanded_action: i32,
32018}
32019impl TIME_ESTIMATE_TO_TARGET_DATA {
32020 pub const ENCODED_LEN: usize = 20usize;
32021 pub const DEFAULT: Self = Self {
32022 safe_return: 0_i32,
32023 land: 0_i32,
32024 mission_next_item: 0_i32,
32025 mission_end: 0_i32,
32026 commanded_action: 0_i32,
32027 };
32028 #[cfg(feature = "arbitrary")]
32029 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32030 use arbitrary::{Arbitrary, Unstructured};
32031 let mut buf = [0u8; 1024];
32032 rng.fill_bytes(&mut buf);
32033 let mut unstructured = Unstructured::new(&buf);
32034 Self::arbitrary(&mut unstructured).unwrap_or_default()
32035 }
32036}
32037impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
32038 fn default() -> Self {
32039 Self::DEFAULT.clone()
32040 }
32041}
32042impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
32043 type Message = MavMessage;
32044 const ID: u32 = 380u32;
32045 const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
32046 const EXTRA_CRC: u8 = 232u8;
32047 const ENCODED_LEN: usize = 20usize;
32048 fn deser(
32049 _version: MavlinkVersion,
32050 __input: &[u8],
32051 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32052 let avail_len = __input.len();
32053 let mut payload_buf = [0; Self::ENCODED_LEN];
32054 let mut buf = if avail_len < Self::ENCODED_LEN {
32055 payload_buf[0..avail_len].copy_from_slice(__input);
32056 Bytes::new(&payload_buf)
32057 } else {
32058 Bytes::new(__input)
32059 };
32060 let mut __struct = Self::default();
32061 __struct.safe_return = buf.get_i32_le()?;
32062 __struct.land = buf.get_i32_le()?;
32063 __struct.mission_next_item = buf.get_i32_le()?;
32064 __struct.mission_end = buf.get_i32_le()?;
32065 __struct.commanded_action = buf.get_i32_le()?;
32066 Ok(__struct)
32067 }
32068 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32069 let mut __tmp = BytesMut::new(bytes);
32070 #[allow(clippy::absurd_extreme_comparisons)]
32071 #[allow(unused_comparisons)]
32072 if __tmp.remaining() < Self::ENCODED_LEN {
32073 panic!(
32074 "buffer is too small (need {} bytes, but got {})",
32075 Self::ENCODED_LEN,
32076 __tmp.remaining(),
32077 )
32078 }
32079 __tmp.put_i32_le(self.safe_return);
32080 __tmp.put_i32_le(self.land);
32081 __tmp.put_i32_le(self.mission_next_item);
32082 __tmp.put_i32_le(self.mission_end);
32083 __tmp.put_i32_le(self.commanded_action);
32084 if matches!(version, MavlinkVersion::V2) {
32085 let len = __tmp.len();
32086 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32087 } else {
32088 __tmp.len()
32089 }
32090 }
32091}
32092#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
32093#[doc = ""]
32094#[doc = "ID: 333"]
32095#[derive(Debug, Clone, PartialEq)]
32096#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32097#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32098#[cfg_attr(feature = "ts", derive(TS))]
32099#[cfg_attr(feature = "ts", ts(export))]
32100pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32101 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32102 pub time_usec: u64,
32103 #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
32104 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32105 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32106 pub pos_x: [f32; 5],
32107 #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
32108 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32109 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32110 pub pos_y: [f32; 5],
32111 #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
32112 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32113 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32114 pub pos_z: [f32; 5],
32115 #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
32116 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32117 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32118 pub delta: [f32; 5],
32119 #[doc = "Yaw. Set to NaN for unchanged"]
32120 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32121 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32122 pub pos_yaw: [f32; 5],
32123 #[doc = "Number of valid control points (up-to 5 points are possible)"]
32124 pub valid_points: u8,
32125}
32126impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32127 pub const ENCODED_LEN: usize = 109usize;
32128 pub const DEFAULT: Self = Self {
32129 time_usec: 0_u64,
32130 pos_x: [0.0_f32; 5usize],
32131 pos_y: [0.0_f32; 5usize],
32132 pos_z: [0.0_f32; 5usize],
32133 delta: [0.0_f32; 5usize],
32134 pos_yaw: [0.0_f32; 5usize],
32135 valid_points: 0_u8,
32136 };
32137 #[cfg(feature = "arbitrary")]
32138 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32139 use arbitrary::{Arbitrary, Unstructured};
32140 let mut buf = [0u8; 1024];
32141 rng.fill_bytes(&mut buf);
32142 let mut unstructured = Unstructured::new(&buf);
32143 Self::arbitrary(&mut unstructured).unwrap_or_default()
32144 }
32145}
32146impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32147 fn default() -> Self {
32148 Self::DEFAULT.clone()
32149 }
32150}
32151impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32152 type Message = MavMessage;
32153 const ID: u32 = 333u32;
32154 const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32155 const EXTRA_CRC: u8 = 231u8;
32156 const ENCODED_LEN: usize = 109usize;
32157 fn deser(
32158 _version: MavlinkVersion,
32159 __input: &[u8],
32160 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32161 let avail_len = __input.len();
32162 let mut payload_buf = [0; Self::ENCODED_LEN];
32163 let mut buf = if avail_len < Self::ENCODED_LEN {
32164 payload_buf[0..avail_len].copy_from_slice(__input);
32165 Bytes::new(&payload_buf)
32166 } else {
32167 Bytes::new(__input)
32168 };
32169 let mut __struct = Self::default();
32170 __struct.time_usec = buf.get_u64_le()?;
32171 for v in &mut __struct.pos_x {
32172 let val = buf.get_f32_le()?;
32173 *v = val;
32174 }
32175 for v in &mut __struct.pos_y {
32176 let val = buf.get_f32_le()?;
32177 *v = val;
32178 }
32179 for v in &mut __struct.pos_z {
32180 let val = buf.get_f32_le()?;
32181 *v = val;
32182 }
32183 for v in &mut __struct.delta {
32184 let val = buf.get_f32_le()?;
32185 *v = val;
32186 }
32187 for v in &mut __struct.pos_yaw {
32188 let val = buf.get_f32_le()?;
32189 *v = val;
32190 }
32191 __struct.valid_points = buf.get_u8()?;
32192 Ok(__struct)
32193 }
32194 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32195 let mut __tmp = BytesMut::new(bytes);
32196 #[allow(clippy::absurd_extreme_comparisons)]
32197 #[allow(unused_comparisons)]
32198 if __tmp.remaining() < Self::ENCODED_LEN {
32199 panic!(
32200 "buffer is too small (need {} bytes, but got {})",
32201 Self::ENCODED_LEN,
32202 __tmp.remaining(),
32203 )
32204 }
32205 __tmp.put_u64_le(self.time_usec);
32206 for val in &self.pos_x {
32207 __tmp.put_f32_le(*val);
32208 }
32209 for val in &self.pos_y {
32210 __tmp.put_f32_le(*val);
32211 }
32212 for val in &self.pos_z {
32213 __tmp.put_f32_le(*val);
32214 }
32215 for val in &self.delta {
32216 __tmp.put_f32_le(*val);
32217 }
32218 for val in &self.pos_yaw {
32219 __tmp.put_f32_le(*val);
32220 }
32221 __tmp.put_u8(self.valid_points);
32222 if matches!(version, MavlinkVersion::V2) {
32223 let len = __tmp.len();
32224 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32225 } else {
32226 __tmp.len()
32227 }
32228 }
32229}
32230#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32231#[doc = ""]
32232#[doc = "ID: 332"]
32233#[derive(Debug, Clone, PartialEq)]
32234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32236#[cfg_attr(feature = "ts", derive(TS))]
32237#[cfg_attr(feature = "ts", ts(export))]
32238pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32239 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32240 pub time_usec: u64,
32241 #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32242 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32243 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32244 pub pos_x: [f32; 5],
32245 #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32246 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32247 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32248 pub pos_y: [f32; 5],
32249 #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32250 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32251 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32252 pub pos_z: [f32; 5],
32253 #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32254 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32255 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32256 pub vel_x: [f32; 5],
32257 #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32258 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32259 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32260 pub vel_y: [f32; 5],
32261 #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
32262 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32263 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32264 pub vel_z: [f32; 5],
32265 #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
32266 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32267 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32268 pub acc_x: [f32; 5],
32269 #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
32270 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32271 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32272 pub acc_y: [f32; 5],
32273 #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
32274 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32275 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32276 pub acc_z: [f32; 5],
32277 #[doc = "Yaw angle, set to NaN if not being used"]
32278 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32279 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32280 pub pos_yaw: [f32; 5],
32281 #[doc = "Yaw rate, set to NaN if not being used"]
32282 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32283 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32284 pub vel_yaw: [f32; 5],
32285 #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
32286 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32287 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32288 pub command: [u16; 5],
32289 #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
32290 pub valid_points: u8,
32291}
32292impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32293 pub const ENCODED_LEN: usize = 239usize;
32294 pub const DEFAULT: Self = Self {
32295 time_usec: 0_u64,
32296 pos_x: [0.0_f32; 5usize],
32297 pos_y: [0.0_f32; 5usize],
32298 pos_z: [0.0_f32; 5usize],
32299 vel_x: [0.0_f32; 5usize],
32300 vel_y: [0.0_f32; 5usize],
32301 vel_z: [0.0_f32; 5usize],
32302 acc_x: [0.0_f32; 5usize],
32303 acc_y: [0.0_f32; 5usize],
32304 acc_z: [0.0_f32; 5usize],
32305 pos_yaw: [0.0_f32; 5usize],
32306 vel_yaw: [0.0_f32; 5usize],
32307 command: [0_u16; 5usize],
32308 valid_points: 0_u8,
32309 };
32310 #[cfg(feature = "arbitrary")]
32311 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32312 use arbitrary::{Arbitrary, Unstructured};
32313 let mut buf = [0u8; 1024];
32314 rng.fill_bytes(&mut buf);
32315 let mut unstructured = Unstructured::new(&buf);
32316 Self::arbitrary(&mut unstructured).unwrap_or_default()
32317 }
32318}
32319impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32320 fn default() -> Self {
32321 Self::DEFAULT.clone()
32322 }
32323}
32324impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32325 type Message = MavMessage;
32326 const ID: u32 = 332u32;
32327 const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
32328 const EXTRA_CRC: u8 = 236u8;
32329 const ENCODED_LEN: usize = 239usize;
32330 fn deser(
32331 _version: MavlinkVersion,
32332 __input: &[u8],
32333 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32334 let avail_len = __input.len();
32335 let mut payload_buf = [0; Self::ENCODED_LEN];
32336 let mut buf = if avail_len < Self::ENCODED_LEN {
32337 payload_buf[0..avail_len].copy_from_slice(__input);
32338 Bytes::new(&payload_buf)
32339 } else {
32340 Bytes::new(__input)
32341 };
32342 let mut __struct = Self::default();
32343 __struct.time_usec = buf.get_u64_le()?;
32344 for v in &mut __struct.pos_x {
32345 let val = buf.get_f32_le()?;
32346 *v = val;
32347 }
32348 for v in &mut __struct.pos_y {
32349 let val = buf.get_f32_le()?;
32350 *v = val;
32351 }
32352 for v in &mut __struct.pos_z {
32353 let val = buf.get_f32_le()?;
32354 *v = val;
32355 }
32356 for v in &mut __struct.vel_x {
32357 let val = buf.get_f32_le()?;
32358 *v = val;
32359 }
32360 for v in &mut __struct.vel_y {
32361 let val = buf.get_f32_le()?;
32362 *v = val;
32363 }
32364 for v in &mut __struct.vel_z {
32365 let val = buf.get_f32_le()?;
32366 *v = val;
32367 }
32368 for v in &mut __struct.acc_x {
32369 let val = buf.get_f32_le()?;
32370 *v = val;
32371 }
32372 for v in &mut __struct.acc_y {
32373 let val = buf.get_f32_le()?;
32374 *v = val;
32375 }
32376 for v in &mut __struct.acc_z {
32377 let val = buf.get_f32_le()?;
32378 *v = val;
32379 }
32380 for v in &mut __struct.pos_yaw {
32381 let val = buf.get_f32_le()?;
32382 *v = val;
32383 }
32384 for v in &mut __struct.vel_yaw {
32385 let val = buf.get_f32_le()?;
32386 *v = val;
32387 }
32388 for v in &mut __struct.command {
32389 let val = buf.get_u16_le()?;
32390 *v = val;
32391 }
32392 __struct.valid_points = buf.get_u8()?;
32393 Ok(__struct)
32394 }
32395 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32396 let mut __tmp = BytesMut::new(bytes);
32397 #[allow(clippy::absurd_extreme_comparisons)]
32398 #[allow(unused_comparisons)]
32399 if __tmp.remaining() < Self::ENCODED_LEN {
32400 panic!(
32401 "buffer is too small (need {} bytes, but got {})",
32402 Self::ENCODED_LEN,
32403 __tmp.remaining(),
32404 )
32405 }
32406 __tmp.put_u64_le(self.time_usec);
32407 for val in &self.pos_x {
32408 __tmp.put_f32_le(*val);
32409 }
32410 for val in &self.pos_y {
32411 __tmp.put_f32_le(*val);
32412 }
32413 for val in &self.pos_z {
32414 __tmp.put_f32_le(*val);
32415 }
32416 for val in &self.vel_x {
32417 __tmp.put_f32_le(*val);
32418 }
32419 for val in &self.vel_y {
32420 __tmp.put_f32_le(*val);
32421 }
32422 for val in &self.vel_z {
32423 __tmp.put_f32_le(*val);
32424 }
32425 for val in &self.acc_x {
32426 __tmp.put_f32_le(*val);
32427 }
32428 for val in &self.acc_y {
32429 __tmp.put_f32_le(*val);
32430 }
32431 for val in &self.acc_z {
32432 __tmp.put_f32_le(*val);
32433 }
32434 for val in &self.pos_yaw {
32435 __tmp.put_f32_le(*val);
32436 }
32437 for val in &self.vel_yaw {
32438 __tmp.put_f32_le(*val);
32439 }
32440 for val in &self.command {
32441 __tmp.put_u16_le(*val);
32442 }
32443 __tmp.put_u8(self.valid_points);
32444 if matches!(version, MavlinkVersion::V2) {
32445 let len = __tmp.len();
32446 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32447 } else {
32448 __tmp.len()
32449 }
32450 }
32451}
32452#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32453#[doc = ""]
32454#[doc = "ID: 385"]
32455#[derive(Debug, Clone, PartialEq)]
32456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32458#[cfg_attr(feature = "ts", derive(TS))]
32459#[cfg_attr(feature = "ts", ts(export))]
32460pub struct TUNNEL_DATA {
32461 #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32462 pub payload_type: MavTunnelPayloadType,
32463 #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32464 pub target_system: u8,
32465 #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32466 pub target_component: u8,
32467 #[doc = "Length of the data transported in payload"]
32468 pub payload_length: u8,
32469 #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32470 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32471 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32472 pub payload: [u8; 128],
32473}
32474impl TUNNEL_DATA {
32475 pub const ENCODED_LEN: usize = 133usize;
32476 pub const DEFAULT: Self = Self {
32477 payload_type: MavTunnelPayloadType::DEFAULT,
32478 target_system: 0_u8,
32479 target_component: 0_u8,
32480 payload_length: 0_u8,
32481 payload: [0_u8; 128usize],
32482 };
32483 #[cfg(feature = "arbitrary")]
32484 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32485 use arbitrary::{Arbitrary, Unstructured};
32486 let mut buf = [0u8; 1024];
32487 rng.fill_bytes(&mut buf);
32488 let mut unstructured = Unstructured::new(&buf);
32489 Self::arbitrary(&mut unstructured).unwrap_or_default()
32490 }
32491}
32492impl Default for TUNNEL_DATA {
32493 fn default() -> Self {
32494 Self::DEFAULT.clone()
32495 }
32496}
32497impl MessageData for TUNNEL_DATA {
32498 type Message = MavMessage;
32499 const ID: u32 = 385u32;
32500 const NAME: &'static str = "TUNNEL";
32501 const EXTRA_CRC: u8 = 147u8;
32502 const ENCODED_LEN: usize = 133usize;
32503 fn deser(
32504 _version: MavlinkVersion,
32505 __input: &[u8],
32506 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32507 let avail_len = __input.len();
32508 let mut payload_buf = [0; Self::ENCODED_LEN];
32509 let mut buf = if avail_len < Self::ENCODED_LEN {
32510 payload_buf[0..avail_len].copy_from_slice(__input);
32511 Bytes::new(&payload_buf)
32512 } else {
32513 Bytes::new(__input)
32514 };
32515 let mut __struct = Self::default();
32516 let tmp = buf.get_u16_le()?;
32517 __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32518 ::mavlink_core::error::ParserError::InvalidEnum {
32519 enum_type: "MavTunnelPayloadType",
32520 value: tmp as u64,
32521 },
32522 )?;
32523 __struct.target_system = buf.get_u8()?;
32524 __struct.target_component = buf.get_u8()?;
32525 __struct.payload_length = buf.get_u8()?;
32526 for v in &mut __struct.payload {
32527 let val = buf.get_u8()?;
32528 *v = val;
32529 }
32530 Ok(__struct)
32531 }
32532 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32533 let mut __tmp = BytesMut::new(bytes);
32534 #[allow(clippy::absurd_extreme_comparisons)]
32535 #[allow(unused_comparisons)]
32536 if __tmp.remaining() < Self::ENCODED_LEN {
32537 panic!(
32538 "buffer is too small (need {} bytes, but got {})",
32539 Self::ENCODED_LEN,
32540 __tmp.remaining(),
32541 )
32542 }
32543 __tmp.put_u16_le(self.payload_type as u16);
32544 __tmp.put_u8(self.target_system);
32545 __tmp.put_u8(self.target_component);
32546 __tmp.put_u8(self.payload_length);
32547 for val in &self.payload {
32548 __tmp.put_u8(*val);
32549 }
32550 if matches!(version, MavlinkVersion::V2) {
32551 let len = __tmp.len();
32552 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32553 } else {
32554 __tmp.len()
32555 }
32556 }
32557}
32558#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32559#[doc = ""]
32560#[doc = "ID: 311"]
32561#[derive(Debug, Clone, PartialEq)]
32562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32564#[cfg_attr(feature = "ts", derive(TS))]
32565#[cfg_attr(feature = "ts", ts(export))]
32566pub struct UAVCAN_NODE_INFO_DATA {
32567 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32568 pub time_usec: u64,
32569 #[doc = "Time since the start-up of the node."]
32570 pub uptime_sec: u32,
32571 #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32572 pub sw_vcs_commit: u32,
32573 #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32574 #[cfg_attr(feature = "ts", ts(type = "string"))]
32575 pub name: CharArray<80>,
32576 #[doc = "Hardware major version number."]
32577 pub hw_version_major: u8,
32578 #[doc = "Hardware minor version number."]
32579 pub hw_version_minor: u8,
32580 #[doc = "Hardware unique 128-bit ID."]
32581 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32582 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32583 pub hw_unique_id: [u8; 16],
32584 #[doc = "Software major version number."]
32585 pub sw_version_major: u8,
32586 #[doc = "Software minor version number."]
32587 pub sw_version_minor: u8,
32588}
32589impl UAVCAN_NODE_INFO_DATA {
32590 pub const ENCODED_LEN: usize = 116usize;
32591 pub const DEFAULT: Self = Self {
32592 time_usec: 0_u64,
32593 uptime_sec: 0_u32,
32594 sw_vcs_commit: 0_u32,
32595 name: CharArray::new([0_u8; 80usize]),
32596 hw_version_major: 0_u8,
32597 hw_version_minor: 0_u8,
32598 hw_unique_id: [0_u8; 16usize],
32599 sw_version_major: 0_u8,
32600 sw_version_minor: 0_u8,
32601 };
32602 #[cfg(feature = "arbitrary")]
32603 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32604 use arbitrary::{Arbitrary, Unstructured};
32605 let mut buf = [0u8; 1024];
32606 rng.fill_bytes(&mut buf);
32607 let mut unstructured = Unstructured::new(&buf);
32608 Self::arbitrary(&mut unstructured).unwrap_or_default()
32609 }
32610}
32611impl Default for UAVCAN_NODE_INFO_DATA {
32612 fn default() -> Self {
32613 Self::DEFAULT.clone()
32614 }
32615}
32616impl MessageData for UAVCAN_NODE_INFO_DATA {
32617 type Message = MavMessage;
32618 const ID: u32 = 311u32;
32619 const NAME: &'static str = "UAVCAN_NODE_INFO";
32620 const EXTRA_CRC: u8 = 95u8;
32621 const ENCODED_LEN: usize = 116usize;
32622 fn deser(
32623 _version: MavlinkVersion,
32624 __input: &[u8],
32625 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32626 let avail_len = __input.len();
32627 let mut payload_buf = [0; Self::ENCODED_LEN];
32628 let mut buf = if avail_len < Self::ENCODED_LEN {
32629 payload_buf[0..avail_len].copy_from_slice(__input);
32630 Bytes::new(&payload_buf)
32631 } else {
32632 Bytes::new(__input)
32633 };
32634 let mut __struct = Self::default();
32635 __struct.time_usec = buf.get_u64_le()?;
32636 __struct.uptime_sec = buf.get_u32_le()?;
32637 __struct.sw_vcs_commit = buf.get_u32_le()?;
32638 let mut tmp = [0_u8; 80usize];
32639 for v in &mut tmp {
32640 *v = buf.get_u8()?;
32641 }
32642 __struct.name = CharArray::new(tmp);
32643 __struct.hw_version_major = buf.get_u8()?;
32644 __struct.hw_version_minor = buf.get_u8()?;
32645 for v in &mut __struct.hw_unique_id {
32646 let val = buf.get_u8()?;
32647 *v = val;
32648 }
32649 __struct.sw_version_major = buf.get_u8()?;
32650 __struct.sw_version_minor = buf.get_u8()?;
32651 Ok(__struct)
32652 }
32653 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32654 let mut __tmp = BytesMut::new(bytes);
32655 #[allow(clippy::absurd_extreme_comparisons)]
32656 #[allow(unused_comparisons)]
32657 if __tmp.remaining() < Self::ENCODED_LEN {
32658 panic!(
32659 "buffer is too small (need {} bytes, but got {})",
32660 Self::ENCODED_LEN,
32661 __tmp.remaining(),
32662 )
32663 }
32664 __tmp.put_u64_le(self.time_usec);
32665 __tmp.put_u32_le(self.uptime_sec);
32666 __tmp.put_u32_le(self.sw_vcs_commit);
32667 for val in &self.name {
32668 __tmp.put_u8(*val);
32669 }
32670 __tmp.put_u8(self.hw_version_major);
32671 __tmp.put_u8(self.hw_version_minor);
32672 for val in &self.hw_unique_id {
32673 __tmp.put_u8(*val);
32674 }
32675 __tmp.put_u8(self.sw_version_major);
32676 __tmp.put_u8(self.sw_version_minor);
32677 if matches!(version, MavlinkVersion::V2) {
32678 let len = __tmp.len();
32679 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32680 } else {
32681 __tmp.len()
32682 }
32683 }
32684}
32685#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32686#[doc = ""]
32687#[doc = "ID: 310"]
32688#[derive(Debug, Clone, PartialEq)]
32689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32691#[cfg_attr(feature = "ts", derive(TS))]
32692#[cfg_attr(feature = "ts", ts(export))]
32693pub struct UAVCAN_NODE_STATUS_DATA {
32694 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32695 pub time_usec: u64,
32696 #[doc = "Time since the start-up of the node."]
32697 pub uptime_sec: u32,
32698 #[doc = "Vendor-specific status information."]
32699 pub vendor_specific_status_code: u16,
32700 #[doc = "Generalized node health status."]
32701 pub health: UavcanNodeHealth,
32702 #[doc = "Generalized operating mode."]
32703 pub mode: UavcanNodeMode,
32704 #[doc = "Not used currently."]
32705 pub sub_mode: u8,
32706}
32707impl UAVCAN_NODE_STATUS_DATA {
32708 pub const ENCODED_LEN: usize = 17usize;
32709 pub const DEFAULT: Self = Self {
32710 time_usec: 0_u64,
32711 uptime_sec: 0_u32,
32712 vendor_specific_status_code: 0_u16,
32713 health: UavcanNodeHealth::DEFAULT,
32714 mode: UavcanNodeMode::DEFAULT,
32715 sub_mode: 0_u8,
32716 };
32717 #[cfg(feature = "arbitrary")]
32718 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32719 use arbitrary::{Arbitrary, Unstructured};
32720 let mut buf = [0u8; 1024];
32721 rng.fill_bytes(&mut buf);
32722 let mut unstructured = Unstructured::new(&buf);
32723 Self::arbitrary(&mut unstructured).unwrap_or_default()
32724 }
32725}
32726impl Default for UAVCAN_NODE_STATUS_DATA {
32727 fn default() -> Self {
32728 Self::DEFAULT.clone()
32729 }
32730}
32731impl MessageData for UAVCAN_NODE_STATUS_DATA {
32732 type Message = MavMessage;
32733 const ID: u32 = 310u32;
32734 const NAME: &'static str = "UAVCAN_NODE_STATUS";
32735 const EXTRA_CRC: u8 = 28u8;
32736 const ENCODED_LEN: usize = 17usize;
32737 fn deser(
32738 _version: MavlinkVersion,
32739 __input: &[u8],
32740 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32741 let avail_len = __input.len();
32742 let mut payload_buf = [0; Self::ENCODED_LEN];
32743 let mut buf = if avail_len < Self::ENCODED_LEN {
32744 payload_buf[0..avail_len].copy_from_slice(__input);
32745 Bytes::new(&payload_buf)
32746 } else {
32747 Bytes::new(__input)
32748 };
32749 let mut __struct = Self::default();
32750 __struct.time_usec = buf.get_u64_le()?;
32751 __struct.uptime_sec = buf.get_u32_le()?;
32752 __struct.vendor_specific_status_code = buf.get_u16_le()?;
32753 let tmp = buf.get_u8()?;
32754 __struct.health =
32755 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32756 enum_type: "UavcanNodeHealth",
32757 value: tmp as u64,
32758 })?;
32759 let tmp = buf.get_u8()?;
32760 __struct.mode =
32761 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32762 enum_type: "UavcanNodeMode",
32763 value: tmp as u64,
32764 })?;
32765 __struct.sub_mode = buf.get_u8()?;
32766 Ok(__struct)
32767 }
32768 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32769 let mut __tmp = BytesMut::new(bytes);
32770 #[allow(clippy::absurd_extreme_comparisons)]
32771 #[allow(unused_comparisons)]
32772 if __tmp.remaining() < Self::ENCODED_LEN {
32773 panic!(
32774 "buffer is too small (need {} bytes, but got {})",
32775 Self::ENCODED_LEN,
32776 __tmp.remaining(),
32777 )
32778 }
32779 __tmp.put_u64_le(self.time_usec);
32780 __tmp.put_u32_le(self.uptime_sec);
32781 __tmp.put_u16_le(self.vendor_specific_status_code);
32782 __tmp.put_u8(self.health as u8);
32783 __tmp.put_u8(self.mode as u8);
32784 __tmp.put_u8(self.sub_mode);
32785 if matches!(version, MavlinkVersion::V2) {
32786 let len = __tmp.len();
32787 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32788 } else {
32789 __tmp.len()
32790 }
32791 }
32792}
32793#[doc = "The global position resulting from GPS and sensor fusion."]
32794#[doc = ""]
32795#[doc = "ID: 340"]
32796#[derive(Debug, Clone, PartialEq)]
32797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32799#[cfg_attr(feature = "ts", derive(TS))]
32800#[cfg_attr(feature = "ts", ts(export))]
32801pub struct UTM_GLOBAL_POSITION_DATA {
32802 #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32803 pub time: u64,
32804 #[doc = "Latitude (WGS84)"]
32805 pub lat: i32,
32806 #[doc = "Longitude (WGS84)"]
32807 pub lon: i32,
32808 #[doc = "Altitude (WGS84)"]
32809 pub alt: i32,
32810 #[doc = "Altitude above ground"]
32811 pub relative_alt: i32,
32812 #[doc = "Next waypoint, latitude (WGS84)"]
32813 pub next_lat: i32,
32814 #[doc = "Next waypoint, longitude (WGS84)"]
32815 pub next_lon: i32,
32816 #[doc = "Next waypoint, altitude (WGS84)"]
32817 pub next_alt: i32,
32818 #[doc = "Ground X speed (latitude, positive north)"]
32819 pub vx: i16,
32820 #[doc = "Ground Y speed (longitude, positive east)"]
32821 pub vy: i16,
32822 #[doc = "Ground Z speed (altitude, positive down)"]
32823 pub vz: i16,
32824 #[doc = "Horizontal position uncertainty (standard deviation)"]
32825 pub h_acc: u16,
32826 #[doc = "Altitude uncertainty (standard deviation)"]
32827 pub v_acc: u16,
32828 #[doc = "Speed uncertainty (standard deviation)"]
32829 pub vel_acc: u16,
32830 #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32831 pub update_rate: u16,
32832 #[doc = "Unique UAS ID."]
32833 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32834 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32835 pub uas_id: [u8; 18],
32836 #[doc = "Flight state"]
32837 pub flight_state: UtmFlightState,
32838 #[doc = "Bitwise OR combination of the data available flags."]
32839 pub flags: UtmDataAvailFlags,
32840}
32841impl UTM_GLOBAL_POSITION_DATA {
32842 pub const ENCODED_LEN: usize = 70usize;
32843 pub const DEFAULT: Self = Self {
32844 time: 0_u64,
32845 lat: 0_i32,
32846 lon: 0_i32,
32847 alt: 0_i32,
32848 relative_alt: 0_i32,
32849 next_lat: 0_i32,
32850 next_lon: 0_i32,
32851 next_alt: 0_i32,
32852 vx: 0_i16,
32853 vy: 0_i16,
32854 vz: 0_i16,
32855 h_acc: 0_u16,
32856 v_acc: 0_u16,
32857 vel_acc: 0_u16,
32858 update_rate: 0_u16,
32859 uas_id: [0_u8; 18usize],
32860 flight_state: UtmFlightState::DEFAULT,
32861 flags: UtmDataAvailFlags::DEFAULT,
32862 };
32863 #[cfg(feature = "arbitrary")]
32864 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32865 use arbitrary::{Arbitrary, Unstructured};
32866 let mut buf = [0u8; 1024];
32867 rng.fill_bytes(&mut buf);
32868 let mut unstructured = Unstructured::new(&buf);
32869 Self::arbitrary(&mut unstructured).unwrap_or_default()
32870 }
32871}
32872impl Default for UTM_GLOBAL_POSITION_DATA {
32873 fn default() -> Self {
32874 Self::DEFAULT.clone()
32875 }
32876}
32877impl MessageData for UTM_GLOBAL_POSITION_DATA {
32878 type Message = MavMessage;
32879 const ID: u32 = 340u32;
32880 const NAME: &'static str = "UTM_GLOBAL_POSITION";
32881 const EXTRA_CRC: u8 = 99u8;
32882 const ENCODED_LEN: usize = 70usize;
32883 fn deser(
32884 _version: MavlinkVersion,
32885 __input: &[u8],
32886 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32887 let avail_len = __input.len();
32888 let mut payload_buf = [0; Self::ENCODED_LEN];
32889 let mut buf = if avail_len < Self::ENCODED_LEN {
32890 payload_buf[0..avail_len].copy_from_slice(__input);
32891 Bytes::new(&payload_buf)
32892 } else {
32893 Bytes::new(__input)
32894 };
32895 let mut __struct = Self::default();
32896 __struct.time = buf.get_u64_le()?;
32897 __struct.lat = buf.get_i32_le()?;
32898 __struct.lon = buf.get_i32_le()?;
32899 __struct.alt = buf.get_i32_le()?;
32900 __struct.relative_alt = buf.get_i32_le()?;
32901 __struct.next_lat = buf.get_i32_le()?;
32902 __struct.next_lon = buf.get_i32_le()?;
32903 __struct.next_alt = buf.get_i32_le()?;
32904 __struct.vx = buf.get_i16_le()?;
32905 __struct.vy = buf.get_i16_le()?;
32906 __struct.vz = buf.get_i16_le()?;
32907 __struct.h_acc = buf.get_u16_le()?;
32908 __struct.v_acc = buf.get_u16_le()?;
32909 __struct.vel_acc = buf.get_u16_le()?;
32910 __struct.update_rate = buf.get_u16_le()?;
32911 for v in &mut __struct.uas_id {
32912 let val = buf.get_u8()?;
32913 *v = val;
32914 }
32915 let tmp = buf.get_u8()?;
32916 __struct.flight_state =
32917 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32918 enum_type: "UtmFlightState",
32919 value: tmp as u64,
32920 })?;
32921 let tmp = buf.get_u8()?;
32922 __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
32923 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32924 flag_type: "UtmDataAvailFlags",
32925 value: tmp as u64,
32926 })?;
32927 Ok(__struct)
32928 }
32929 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32930 let mut __tmp = BytesMut::new(bytes);
32931 #[allow(clippy::absurd_extreme_comparisons)]
32932 #[allow(unused_comparisons)]
32933 if __tmp.remaining() < Self::ENCODED_LEN {
32934 panic!(
32935 "buffer is too small (need {} bytes, but got {})",
32936 Self::ENCODED_LEN,
32937 __tmp.remaining(),
32938 )
32939 }
32940 __tmp.put_u64_le(self.time);
32941 __tmp.put_i32_le(self.lat);
32942 __tmp.put_i32_le(self.lon);
32943 __tmp.put_i32_le(self.alt);
32944 __tmp.put_i32_le(self.relative_alt);
32945 __tmp.put_i32_le(self.next_lat);
32946 __tmp.put_i32_le(self.next_lon);
32947 __tmp.put_i32_le(self.next_alt);
32948 __tmp.put_i16_le(self.vx);
32949 __tmp.put_i16_le(self.vy);
32950 __tmp.put_i16_le(self.vz);
32951 __tmp.put_u16_le(self.h_acc);
32952 __tmp.put_u16_le(self.v_acc);
32953 __tmp.put_u16_le(self.vel_acc);
32954 __tmp.put_u16_le(self.update_rate);
32955 for val in &self.uas_id {
32956 __tmp.put_u8(*val);
32957 }
32958 __tmp.put_u8(self.flight_state as u8);
32959 __tmp.put_u8(self.flags.bits() as u8);
32960 if matches!(version, MavlinkVersion::V2) {
32961 let len = __tmp.len();
32962 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32963 } else {
32964 __tmp.len()
32965 }
32966 }
32967}
32968#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32969#[doc = ""]
32970#[doc = "ID: 248"]
32971#[derive(Debug, Clone, PartialEq)]
32972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32974#[cfg_attr(feature = "ts", derive(TS))]
32975#[cfg_attr(feature = "ts", ts(export))]
32976pub struct V2_EXTENSION_DATA {
32977 #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32978 pub message_type: u16,
32979 #[doc = "Network ID (0 for broadcast)"]
32980 pub target_network: u8,
32981 #[doc = "System ID (0 for broadcast)"]
32982 pub target_system: u8,
32983 #[doc = "Component ID (0 for broadcast)"]
32984 pub target_component: u8,
32985 #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32986 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32987 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32988 pub payload: [u8; 249],
32989}
32990impl V2_EXTENSION_DATA {
32991 pub const ENCODED_LEN: usize = 254usize;
32992 pub const DEFAULT: Self = Self {
32993 message_type: 0_u16,
32994 target_network: 0_u8,
32995 target_system: 0_u8,
32996 target_component: 0_u8,
32997 payload: [0_u8; 249usize],
32998 };
32999 #[cfg(feature = "arbitrary")]
33000 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33001 use arbitrary::{Arbitrary, Unstructured};
33002 let mut buf = [0u8; 1024];
33003 rng.fill_bytes(&mut buf);
33004 let mut unstructured = Unstructured::new(&buf);
33005 Self::arbitrary(&mut unstructured).unwrap_or_default()
33006 }
33007}
33008impl Default for V2_EXTENSION_DATA {
33009 fn default() -> Self {
33010 Self::DEFAULT.clone()
33011 }
33012}
33013impl MessageData for V2_EXTENSION_DATA {
33014 type Message = MavMessage;
33015 const ID: u32 = 248u32;
33016 const NAME: &'static str = "V2_EXTENSION";
33017 const EXTRA_CRC: u8 = 8u8;
33018 const ENCODED_LEN: usize = 254usize;
33019 fn deser(
33020 _version: MavlinkVersion,
33021 __input: &[u8],
33022 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33023 let avail_len = __input.len();
33024 let mut payload_buf = [0; Self::ENCODED_LEN];
33025 let mut buf = if avail_len < Self::ENCODED_LEN {
33026 payload_buf[0..avail_len].copy_from_slice(__input);
33027 Bytes::new(&payload_buf)
33028 } else {
33029 Bytes::new(__input)
33030 };
33031 let mut __struct = Self::default();
33032 __struct.message_type = buf.get_u16_le()?;
33033 __struct.target_network = buf.get_u8()?;
33034 __struct.target_system = buf.get_u8()?;
33035 __struct.target_component = buf.get_u8()?;
33036 for v in &mut __struct.payload {
33037 let val = buf.get_u8()?;
33038 *v = val;
33039 }
33040 Ok(__struct)
33041 }
33042 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33043 let mut __tmp = BytesMut::new(bytes);
33044 #[allow(clippy::absurd_extreme_comparisons)]
33045 #[allow(unused_comparisons)]
33046 if __tmp.remaining() < Self::ENCODED_LEN {
33047 panic!(
33048 "buffer is too small (need {} bytes, but got {})",
33049 Self::ENCODED_LEN,
33050 __tmp.remaining(),
33051 )
33052 }
33053 __tmp.put_u16_le(self.message_type);
33054 __tmp.put_u8(self.target_network);
33055 __tmp.put_u8(self.target_system);
33056 __tmp.put_u8(self.target_component);
33057 for val in &self.payload {
33058 __tmp.put_u8(*val);
33059 }
33060 if matches!(version, MavlinkVersion::V2) {
33061 let len = __tmp.len();
33062 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33063 } else {
33064 __tmp.len()
33065 }
33066 }
33067}
33068#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33069#[doc = ""]
33070#[doc = "ID: 74"]
33071#[derive(Debug, Clone, PartialEq)]
33072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33074#[cfg_attr(feature = "ts", derive(TS))]
33075#[cfg_attr(feature = "ts", ts(export))]
33076pub struct VFR_HUD_DATA {
33077 #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
33078 pub airspeed: f32,
33079 #[doc = "Current ground speed."]
33080 pub groundspeed: f32,
33081 #[doc = "Current altitude (MSL)."]
33082 pub alt: f32,
33083 #[doc = "Current climb rate."]
33084 pub climb: f32,
33085 #[doc = "Current heading in compass units (0-360, 0=north)."]
33086 pub heading: i16,
33087 #[doc = "Current throttle setting (0 to 100)."]
33088 pub throttle: u16,
33089}
33090impl VFR_HUD_DATA {
33091 pub const ENCODED_LEN: usize = 20usize;
33092 pub const DEFAULT: Self = Self {
33093 airspeed: 0.0_f32,
33094 groundspeed: 0.0_f32,
33095 alt: 0.0_f32,
33096 climb: 0.0_f32,
33097 heading: 0_i16,
33098 throttle: 0_u16,
33099 };
33100 #[cfg(feature = "arbitrary")]
33101 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33102 use arbitrary::{Arbitrary, Unstructured};
33103 let mut buf = [0u8; 1024];
33104 rng.fill_bytes(&mut buf);
33105 let mut unstructured = Unstructured::new(&buf);
33106 Self::arbitrary(&mut unstructured).unwrap_or_default()
33107 }
33108}
33109impl Default for VFR_HUD_DATA {
33110 fn default() -> Self {
33111 Self::DEFAULT.clone()
33112 }
33113}
33114impl MessageData for VFR_HUD_DATA {
33115 type Message = MavMessage;
33116 const ID: u32 = 74u32;
33117 const NAME: &'static str = "VFR_HUD";
33118 const EXTRA_CRC: u8 = 20u8;
33119 const ENCODED_LEN: usize = 20usize;
33120 fn deser(
33121 _version: MavlinkVersion,
33122 __input: &[u8],
33123 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33124 let avail_len = __input.len();
33125 let mut payload_buf = [0; Self::ENCODED_LEN];
33126 let mut buf = if avail_len < Self::ENCODED_LEN {
33127 payload_buf[0..avail_len].copy_from_slice(__input);
33128 Bytes::new(&payload_buf)
33129 } else {
33130 Bytes::new(__input)
33131 };
33132 let mut __struct = Self::default();
33133 __struct.airspeed = buf.get_f32_le()?;
33134 __struct.groundspeed = buf.get_f32_le()?;
33135 __struct.alt = buf.get_f32_le()?;
33136 __struct.climb = buf.get_f32_le()?;
33137 __struct.heading = buf.get_i16_le()?;
33138 __struct.throttle = buf.get_u16_le()?;
33139 Ok(__struct)
33140 }
33141 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33142 let mut __tmp = BytesMut::new(bytes);
33143 #[allow(clippy::absurd_extreme_comparisons)]
33144 #[allow(unused_comparisons)]
33145 if __tmp.remaining() < Self::ENCODED_LEN {
33146 panic!(
33147 "buffer is too small (need {} bytes, but got {})",
33148 Self::ENCODED_LEN,
33149 __tmp.remaining(),
33150 )
33151 }
33152 __tmp.put_f32_le(self.airspeed);
33153 __tmp.put_f32_le(self.groundspeed);
33154 __tmp.put_f32_le(self.alt);
33155 __tmp.put_f32_le(self.climb);
33156 __tmp.put_i16_le(self.heading);
33157 __tmp.put_u16_le(self.throttle);
33158 if matches!(version, MavlinkVersion::V2) {
33159 let len = __tmp.len();
33160 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33161 } else {
33162 __tmp.len()
33163 }
33164 }
33165}
33166#[doc = "Vibration levels and accelerometer clipping."]
33167#[doc = ""]
33168#[doc = "ID: 241"]
33169#[derive(Debug, Clone, PartialEq)]
33170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33172#[cfg_attr(feature = "ts", derive(TS))]
33173#[cfg_attr(feature = "ts", ts(export))]
33174pub struct VIBRATION_DATA {
33175 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33176 pub time_usec: u64,
33177 #[doc = "Vibration levels on X-axis"]
33178 pub vibration_x: f32,
33179 #[doc = "Vibration levels on Y-axis"]
33180 pub vibration_y: f32,
33181 #[doc = "Vibration levels on Z-axis"]
33182 pub vibration_z: f32,
33183 #[doc = "first accelerometer clipping count"]
33184 pub clipping_0: u32,
33185 #[doc = "second accelerometer clipping count"]
33186 pub clipping_1: u32,
33187 #[doc = "third accelerometer clipping count"]
33188 pub clipping_2: u32,
33189}
33190impl VIBRATION_DATA {
33191 pub const ENCODED_LEN: usize = 32usize;
33192 pub const DEFAULT: Self = Self {
33193 time_usec: 0_u64,
33194 vibration_x: 0.0_f32,
33195 vibration_y: 0.0_f32,
33196 vibration_z: 0.0_f32,
33197 clipping_0: 0_u32,
33198 clipping_1: 0_u32,
33199 clipping_2: 0_u32,
33200 };
33201 #[cfg(feature = "arbitrary")]
33202 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33203 use arbitrary::{Arbitrary, Unstructured};
33204 let mut buf = [0u8; 1024];
33205 rng.fill_bytes(&mut buf);
33206 let mut unstructured = Unstructured::new(&buf);
33207 Self::arbitrary(&mut unstructured).unwrap_or_default()
33208 }
33209}
33210impl Default for VIBRATION_DATA {
33211 fn default() -> Self {
33212 Self::DEFAULT.clone()
33213 }
33214}
33215impl MessageData for VIBRATION_DATA {
33216 type Message = MavMessage;
33217 const ID: u32 = 241u32;
33218 const NAME: &'static str = "VIBRATION";
33219 const EXTRA_CRC: u8 = 90u8;
33220 const ENCODED_LEN: usize = 32usize;
33221 fn deser(
33222 _version: MavlinkVersion,
33223 __input: &[u8],
33224 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33225 let avail_len = __input.len();
33226 let mut payload_buf = [0; Self::ENCODED_LEN];
33227 let mut buf = if avail_len < Self::ENCODED_LEN {
33228 payload_buf[0..avail_len].copy_from_slice(__input);
33229 Bytes::new(&payload_buf)
33230 } else {
33231 Bytes::new(__input)
33232 };
33233 let mut __struct = Self::default();
33234 __struct.time_usec = buf.get_u64_le()?;
33235 __struct.vibration_x = buf.get_f32_le()?;
33236 __struct.vibration_y = buf.get_f32_le()?;
33237 __struct.vibration_z = buf.get_f32_le()?;
33238 __struct.clipping_0 = buf.get_u32_le()?;
33239 __struct.clipping_1 = buf.get_u32_le()?;
33240 __struct.clipping_2 = buf.get_u32_le()?;
33241 Ok(__struct)
33242 }
33243 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33244 let mut __tmp = BytesMut::new(bytes);
33245 #[allow(clippy::absurd_extreme_comparisons)]
33246 #[allow(unused_comparisons)]
33247 if __tmp.remaining() < Self::ENCODED_LEN {
33248 panic!(
33249 "buffer is too small (need {} bytes, but got {})",
33250 Self::ENCODED_LEN,
33251 __tmp.remaining(),
33252 )
33253 }
33254 __tmp.put_u64_le(self.time_usec);
33255 __tmp.put_f32_le(self.vibration_x);
33256 __tmp.put_f32_le(self.vibration_y);
33257 __tmp.put_f32_le(self.vibration_z);
33258 __tmp.put_u32_le(self.clipping_0);
33259 __tmp.put_u32_le(self.clipping_1);
33260 __tmp.put_u32_le(self.clipping_2);
33261 if matches!(version, MavlinkVersion::V2) {
33262 let len = __tmp.len();
33263 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33264 } else {
33265 __tmp.len()
33266 }
33267 }
33268}
33269#[doc = "Global position estimate from a Vicon motion system source."]
33270#[doc = ""]
33271#[doc = "ID: 104"]
33272#[derive(Debug, Clone, PartialEq)]
33273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33275#[cfg_attr(feature = "ts", derive(TS))]
33276#[cfg_attr(feature = "ts", ts(export))]
33277pub struct VICON_POSITION_ESTIMATE_DATA {
33278 #[doc = "Timestamp (UNIX time or time since system boot)"]
33279 pub usec: u64,
33280 #[doc = "Global X position"]
33281 pub x: f32,
33282 #[doc = "Global Y position"]
33283 pub y: f32,
33284 #[doc = "Global Z position"]
33285 pub z: f32,
33286 #[doc = "Roll angle"]
33287 pub roll: f32,
33288 #[doc = "Pitch angle"]
33289 pub pitch: f32,
33290 #[doc = "Yaw angle"]
33291 pub yaw: f32,
33292 #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33293 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33294 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33295 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33296 pub covariance: [f32; 21],
33297}
33298impl VICON_POSITION_ESTIMATE_DATA {
33299 pub const ENCODED_LEN: usize = 116usize;
33300 pub const DEFAULT: Self = Self {
33301 usec: 0_u64,
33302 x: 0.0_f32,
33303 y: 0.0_f32,
33304 z: 0.0_f32,
33305 roll: 0.0_f32,
33306 pitch: 0.0_f32,
33307 yaw: 0.0_f32,
33308 covariance: [0.0_f32; 21usize],
33309 };
33310 #[cfg(feature = "arbitrary")]
33311 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33312 use arbitrary::{Arbitrary, Unstructured};
33313 let mut buf = [0u8; 1024];
33314 rng.fill_bytes(&mut buf);
33315 let mut unstructured = Unstructured::new(&buf);
33316 Self::arbitrary(&mut unstructured).unwrap_or_default()
33317 }
33318}
33319impl Default for VICON_POSITION_ESTIMATE_DATA {
33320 fn default() -> Self {
33321 Self::DEFAULT.clone()
33322 }
33323}
33324impl MessageData for VICON_POSITION_ESTIMATE_DATA {
33325 type Message = MavMessage;
33326 const ID: u32 = 104u32;
33327 const NAME: &'static str = "VICON_POSITION_ESTIMATE";
33328 const EXTRA_CRC: u8 = 56u8;
33329 const ENCODED_LEN: usize = 116usize;
33330 fn deser(
33331 _version: MavlinkVersion,
33332 __input: &[u8],
33333 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33334 let avail_len = __input.len();
33335 let mut payload_buf = [0; Self::ENCODED_LEN];
33336 let mut buf = if avail_len < Self::ENCODED_LEN {
33337 payload_buf[0..avail_len].copy_from_slice(__input);
33338 Bytes::new(&payload_buf)
33339 } else {
33340 Bytes::new(__input)
33341 };
33342 let mut __struct = Self::default();
33343 __struct.usec = buf.get_u64_le()?;
33344 __struct.x = buf.get_f32_le()?;
33345 __struct.y = buf.get_f32_le()?;
33346 __struct.z = buf.get_f32_le()?;
33347 __struct.roll = buf.get_f32_le()?;
33348 __struct.pitch = buf.get_f32_le()?;
33349 __struct.yaw = buf.get_f32_le()?;
33350 for v in &mut __struct.covariance {
33351 let val = buf.get_f32_le()?;
33352 *v = val;
33353 }
33354 Ok(__struct)
33355 }
33356 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33357 let mut __tmp = BytesMut::new(bytes);
33358 #[allow(clippy::absurd_extreme_comparisons)]
33359 #[allow(unused_comparisons)]
33360 if __tmp.remaining() < Self::ENCODED_LEN {
33361 panic!(
33362 "buffer is too small (need {} bytes, but got {})",
33363 Self::ENCODED_LEN,
33364 __tmp.remaining(),
33365 )
33366 }
33367 __tmp.put_u64_le(self.usec);
33368 __tmp.put_f32_le(self.x);
33369 __tmp.put_f32_le(self.y);
33370 __tmp.put_f32_le(self.z);
33371 __tmp.put_f32_le(self.roll);
33372 __tmp.put_f32_le(self.pitch);
33373 __tmp.put_f32_le(self.yaw);
33374 if matches!(version, MavlinkVersion::V2) {
33375 for val in &self.covariance {
33376 __tmp.put_f32_le(*val);
33377 }
33378 let len = __tmp.len();
33379 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33380 } else {
33381 __tmp.len()
33382 }
33383 }
33384}
33385#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33386#[doc = ""]
33387#[doc = "ID: 269"]
33388#[derive(Debug, Clone, PartialEq)]
33389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33391#[cfg_attr(feature = "ts", derive(TS))]
33392#[cfg_attr(feature = "ts", ts(export))]
33393pub struct VIDEO_STREAM_INFORMATION_DATA {
33394 #[doc = "Frame rate."]
33395 pub framerate: f32,
33396 #[doc = "Bit rate."]
33397 pub bitrate: u32,
33398 #[doc = "Bitmap of stream status flags."]
33399 pub flags: VideoStreamStatusFlags,
33400 #[doc = "Horizontal resolution."]
33401 pub resolution_h: u16,
33402 #[doc = "Vertical resolution."]
33403 pub resolution_v: u16,
33404 #[doc = "Video image rotation clockwise."]
33405 pub rotation: u16,
33406 #[doc = "Horizontal Field of view."]
33407 pub hfov: u16,
33408 #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33409 pub stream_id: u8,
33410 #[doc = "Number of streams available."]
33411 pub count: u8,
33412 #[doc = "Type of stream."]
33413 pub mavtype: VideoStreamType,
33414 #[doc = "Stream name."]
33415 #[cfg_attr(feature = "ts", ts(type = "string"))]
33416 pub name: CharArray<32>,
33417 #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
33418 #[cfg_attr(feature = "ts", ts(type = "string"))]
33419 pub uri: CharArray<160>,
33420 #[doc = "Encoding of stream."]
33421 #[cfg_attr(feature = "serde", serde(default))]
33422 pub encoding: VideoStreamEncoding,
33423 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
33424 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33425 pub camera_device_id: u8,
33426}
33427impl VIDEO_STREAM_INFORMATION_DATA {
33428 pub const ENCODED_LEN: usize = 215usize;
33429 pub const DEFAULT: Self = Self {
33430 framerate: 0.0_f32,
33431 bitrate: 0_u32,
33432 flags: VideoStreamStatusFlags::DEFAULT,
33433 resolution_h: 0_u16,
33434 resolution_v: 0_u16,
33435 rotation: 0_u16,
33436 hfov: 0_u16,
33437 stream_id: 0_u8,
33438 count: 0_u8,
33439 mavtype: VideoStreamType::DEFAULT,
33440 name: CharArray::new([0_u8; 32usize]),
33441 uri: CharArray::new([0_u8; 160usize]),
33442 encoding: VideoStreamEncoding::DEFAULT,
33443 camera_device_id: 0_u8,
33444 };
33445 #[cfg(feature = "arbitrary")]
33446 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33447 use arbitrary::{Arbitrary, Unstructured};
33448 let mut buf = [0u8; 1024];
33449 rng.fill_bytes(&mut buf);
33450 let mut unstructured = Unstructured::new(&buf);
33451 Self::arbitrary(&mut unstructured).unwrap_or_default()
33452 }
33453}
33454impl Default for VIDEO_STREAM_INFORMATION_DATA {
33455 fn default() -> Self {
33456 Self::DEFAULT.clone()
33457 }
33458}
33459impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33460 type Message = MavMessage;
33461 const ID: u32 = 269u32;
33462 const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33463 const EXTRA_CRC: u8 = 109u8;
33464 const ENCODED_LEN: usize = 215usize;
33465 fn deser(
33466 _version: MavlinkVersion,
33467 __input: &[u8],
33468 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33469 let avail_len = __input.len();
33470 let mut payload_buf = [0; Self::ENCODED_LEN];
33471 let mut buf = if avail_len < Self::ENCODED_LEN {
33472 payload_buf[0..avail_len].copy_from_slice(__input);
33473 Bytes::new(&payload_buf)
33474 } else {
33475 Bytes::new(__input)
33476 };
33477 let mut __struct = Self::default();
33478 __struct.framerate = buf.get_f32_le()?;
33479 __struct.bitrate = buf.get_u32_le()?;
33480 let tmp = buf.get_u16_le()?;
33481 __struct.flags =
33482 VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
33483 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33484 flag_type: "VideoStreamStatusFlags",
33485 value: tmp as u64,
33486 })?;
33487 __struct.resolution_h = buf.get_u16_le()?;
33488 __struct.resolution_v = buf.get_u16_le()?;
33489 __struct.rotation = buf.get_u16_le()?;
33490 __struct.hfov = buf.get_u16_le()?;
33491 __struct.stream_id = buf.get_u8()?;
33492 __struct.count = buf.get_u8()?;
33493 let tmp = buf.get_u8()?;
33494 __struct.mavtype =
33495 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33496 enum_type: "VideoStreamType",
33497 value: tmp as u64,
33498 })?;
33499 let mut tmp = [0_u8; 32usize];
33500 for v in &mut tmp {
33501 *v = buf.get_u8()?;
33502 }
33503 __struct.name = CharArray::new(tmp);
33504 let mut tmp = [0_u8; 160usize];
33505 for v in &mut tmp {
33506 *v = buf.get_u8()?;
33507 }
33508 __struct.uri = CharArray::new(tmp);
33509 let tmp = buf.get_u8()?;
33510 __struct.encoding =
33511 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33512 enum_type: "VideoStreamEncoding",
33513 value: tmp as u64,
33514 })?;
33515 __struct.camera_device_id = buf.get_u8()?;
33516 Ok(__struct)
33517 }
33518 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33519 let mut __tmp = BytesMut::new(bytes);
33520 #[allow(clippy::absurd_extreme_comparisons)]
33521 #[allow(unused_comparisons)]
33522 if __tmp.remaining() < Self::ENCODED_LEN {
33523 panic!(
33524 "buffer is too small (need {} bytes, but got {})",
33525 Self::ENCODED_LEN,
33526 __tmp.remaining(),
33527 )
33528 }
33529 __tmp.put_f32_le(self.framerate);
33530 __tmp.put_u32_le(self.bitrate);
33531 __tmp.put_u16_le(self.flags.bits() as u16);
33532 __tmp.put_u16_le(self.resolution_h);
33533 __tmp.put_u16_le(self.resolution_v);
33534 __tmp.put_u16_le(self.rotation);
33535 __tmp.put_u16_le(self.hfov);
33536 __tmp.put_u8(self.stream_id);
33537 __tmp.put_u8(self.count);
33538 __tmp.put_u8(self.mavtype as u8);
33539 for val in &self.name {
33540 __tmp.put_u8(*val);
33541 }
33542 for val in &self.uri {
33543 __tmp.put_u8(*val);
33544 }
33545 if matches!(version, MavlinkVersion::V2) {
33546 __tmp.put_u8(self.encoding as u8);
33547 __tmp.put_u8(self.camera_device_id);
33548 let len = __tmp.len();
33549 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33550 } else {
33551 __tmp.len()
33552 }
33553 }
33554}
33555#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33556#[doc = ""]
33557#[doc = "ID: 270"]
33558#[derive(Debug, Clone, PartialEq)]
33559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33561#[cfg_attr(feature = "ts", derive(TS))]
33562#[cfg_attr(feature = "ts", ts(export))]
33563pub struct VIDEO_STREAM_STATUS_DATA {
33564 #[doc = "Frame rate"]
33565 pub framerate: f32,
33566 #[doc = "Bit rate"]
33567 pub bitrate: u32,
33568 #[doc = "Bitmap of stream status flags"]
33569 pub flags: VideoStreamStatusFlags,
33570 #[doc = "Horizontal resolution"]
33571 pub resolution_h: u16,
33572 #[doc = "Vertical resolution"]
33573 pub resolution_v: u16,
33574 #[doc = "Video image rotation clockwise"]
33575 pub rotation: u16,
33576 #[doc = "Horizontal Field of view"]
33577 pub hfov: u16,
33578 #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33579 pub stream_id: u8,
33580 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
33581 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33582 pub camera_device_id: u8,
33583}
33584impl VIDEO_STREAM_STATUS_DATA {
33585 pub const ENCODED_LEN: usize = 20usize;
33586 pub const DEFAULT: Self = Self {
33587 framerate: 0.0_f32,
33588 bitrate: 0_u32,
33589 flags: VideoStreamStatusFlags::DEFAULT,
33590 resolution_h: 0_u16,
33591 resolution_v: 0_u16,
33592 rotation: 0_u16,
33593 hfov: 0_u16,
33594 stream_id: 0_u8,
33595 camera_device_id: 0_u8,
33596 };
33597 #[cfg(feature = "arbitrary")]
33598 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33599 use arbitrary::{Arbitrary, Unstructured};
33600 let mut buf = [0u8; 1024];
33601 rng.fill_bytes(&mut buf);
33602 let mut unstructured = Unstructured::new(&buf);
33603 Self::arbitrary(&mut unstructured).unwrap_or_default()
33604 }
33605}
33606impl Default for VIDEO_STREAM_STATUS_DATA {
33607 fn default() -> Self {
33608 Self::DEFAULT.clone()
33609 }
33610}
33611impl MessageData for VIDEO_STREAM_STATUS_DATA {
33612 type Message = MavMessage;
33613 const ID: u32 = 270u32;
33614 const NAME: &'static str = "VIDEO_STREAM_STATUS";
33615 const EXTRA_CRC: u8 = 59u8;
33616 const ENCODED_LEN: usize = 20usize;
33617 fn deser(
33618 _version: MavlinkVersion,
33619 __input: &[u8],
33620 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33621 let avail_len = __input.len();
33622 let mut payload_buf = [0; Self::ENCODED_LEN];
33623 let mut buf = if avail_len < Self::ENCODED_LEN {
33624 payload_buf[0..avail_len].copy_from_slice(__input);
33625 Bytes::new(&payload_buf)
33626 } else {
33627 Bytes::new(__input)
33628 };
33629 let mut __struct = Self::default();
33630 __struct.framerate = buf.get_f32_le()?;
33631 __struct.bitrate = buf.get_u32_le()?;
33632 let tmp = buf.get_u16_le()?;
33633 __struct.flags =
33634 VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
33635 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33636 flag_type: "VideoStreamStatusFlags",
33637 value: tmp as u64,
33638 })?;
33639 __struct.resolution_h = buf.get_u16_le()?;
33640 __struct.resolution_v = buf.get_u16_le()?;
33641 __struct.rotation = buf.get_u16_le()?;
33642 __struct.hfov = buf.get_u16_le()?;
33643 __struct.stream_id = buf.get_u8()?;
33644 __struct.camera_device_id = buf.get_u8()?;
33645 Ok(__struct)
33646 }
33647 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33648 let mut __tmp = BytesMut::new(bytes);
33649 #[allow(clippy::absurd_extreme_comparisons)]
33650 #[allow(unused_comparisons)]
33651 if __tmp.remaining() < Self::ENCODED_LEN {
33652 panic!(
33653 "buffer is too small (need {} bytes, but got {})",
33654 Self::ENCODED_LEN,
33655 __tmp.remaining(),
33656 )
33657 }
33658 __tmp.put_f32_le(self.framerate);
33659 __tmp.put_u32_le(self.bitrate);
33660 __tmp.put_u16_le(self.flags.bits() as u16);
33661 __tmp.put_u16_le(self.resolution_h);
33662 __tmp.put_u16_le(self.resolution_v);
33663 __tmp.put_u16_le(self.rotation);
33664 __tmp.put_u16_le(self.hfov);
33665 __tmp.put_u8(self.stream_id);
33666 if matches!(version, MavlinkVersion::V2) {
33667 __tmp.put_u8(self.camera_device_id);
33668 let len = __tmp.len();
33669 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33670 } else {
33671 __tmp.len()
33672 }
33673 }
33674}
33675#[doc = "Local position/attitude estimate from a vision source."]
33676#[doc = ""]
33677#[doc = "ID: 102"]
33678#[derive(Debug, Clone, PartialEq)]
33679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33681#[cfg_attr(feature = "ts", derive(TS))]
33682#[cfg_attr(feature = "ts", ts(export))]
33683pub struct VISION_POSITION_ESTIMATE_DATA {
33684 #[doc = "Timestamp (UNIX time or time since system boot)"]
33685 pub usec: u64,
33686 #[doc = "Local X position"]
33687 pub x: f32,
33688 #[doc = "Local Y position"]
33689 pub y: f32,
33690 #[doc = "Local Z position"]
33691 pub z: f32,
33692 #[doc = "Roll angle"]
33693 pub roll: f32,
33694 #[doc = "Pitch angle"]
33695 pub pitch: f32,
33696 #[doc = "Yaw angle"]
33697 pub yaw: f32,
33698 #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33699 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33700 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33701 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33702 pub covariance: [f32; 21],
33703 #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33704 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33705 pub reset_counter: u8,
33706}
33707impl VISION_POSITION_ESTIMATE_DATA {
33708 pub const ENCODED_LEN: usize = 117usize;
33709 pub const DEFAULT: Self = Self {
33710 usec: 0_u64,
33711 x: 0.0_f32,
33712 y: 0.0_f32,
33713 z: 0.0_f32,
33714 roll: 0.0_f32,
33715 pitch: 0.0_f32,
33716 yaw: 0.0_f32,
33717 covariance: [0.0_f32; 21usize],
33718 reset_counter: 0_u8,
33719 };
33720 #[cfg(feature = "arbitrary")]
33721 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33722 use arbitrary::{Arbitrary, Unstructured};
33723 let mut buf = [0u8; 1024];
33724 rng.fill_bytes(&mut buf);
33725 let mut unstructured = Unstructured::new(&buf);
33726 Self::arbitrary(&mut unstructured).unwrap_or_default()
33727 }
33728}
33729impl Default for VISION_POSITION_ESTIMATE_DATA {
33730 fn default() -> Self {
33731 Self::DEFAULT.clone()
33732 }
33733}
33734impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33735 type Message = MavMessage;
33736 const ID: u32 = 102u32;
33737 const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33738 const EXTRA_CRC: u8 = 158u8;
33739 const ENCODED_LEN: usize = 117usize;
33740 fn deser(
33741 _version: MavlinkVersion,
33742 __input: &[u8],
33743 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33744 let avail_len = __input.len();
33745 let mut payload_buf = [0; Self::ENCODED_LEN];
33746 let mut buf = if avail_len < Self::ENCODED_LEN {
33747 payload_buf[0..avail_len].copy_from_slice(__input);
33748 Bytes::new(&payload_buf)
33749 } else {
33750 Bytes::new(__input)
33751 };
33752 let mut __struct = Self::default();
33753 __struct.usec = buf.get_u64_le()?;
33754 __struct.x = buf.get_f32_le()?;
33755 __struct.y = buf.get_f32_le()?;
33756 __struct.z = buf.get_f32_le()?;
33757 __struct.roll = buf.get_f32_le()?;
33758 __struct.pitch = buf.get_f32_le()?;
33759 __struct.yaw = buf.get_f32_le()?;
33760 for v in &mut __struct.covariance {
33761 let val = buf.get_f32_le()?;
33762 *v = val;
33763 }
33764 __struct.reset_counter = buf.get_u8()?;
33765 Ok(__struct)
33766 }
33767 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33768 let mut __tmp = BytesMut::new(bytes);
33769 #[allow(clippy::absurd_extreme_comparisons)]
33770 #[allow(unused_comparisons)]
33771 if __tmp.remaining() < Self::ENCODED_LEN {
33772 panic!(
33773 "buffer is too small (need {} bytes, but got {})",
33774 Self::ENCODED_LEN,
33775 __tmp.remaining(),
33776 )
33777 }
33778 __tmp.put_u64_le(self.usec);
33779 __tmp.put_f32_le(self.x);
33780 __tmp.put_f32_le(self.y);
33781 __tmp.put_f32_le(self.z);
33782 __tmp.put_f32_le(self.roll);
33783 __tmp.put_f32_le(self.pitch);
33784 __tmp.put_f32_le(self.yaw);
33785 if matches!(version, MavlinkVersion::V2) {
33786 for val in &self.covariance {
33787 __tmp.put_f32_le(*val);
33788 }
33789 __tmp.put_u8(self.reset_counter);
33790 let len = __tmp.len();
33791 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33792 } else {
33793 __tmp.len()
33794 }
33795 }
33796}
33797#[doc = "Speed estimate from a vision source."]
33798#[doc = ""]
33799#[doc = "ID: 103"]
33800#[derive(Debug, Clone, PartialEq)]
33801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33803#[cfg_attr(feature = "ts", derive(TS))]
33804#[cfg_attr(feature = "ts", ts(export))]
33805pub struct VISION_SPEED_ESTIMATE_DATA {
33806 #[doc = "Timestamp (UNIX time or time since system boot)"]
33807 pub usec: u64,
33808 #[doc = "Global X speed"]
33809 pub x: f32,
33810 #[doc = "Global Y speed"]
33811 pub y: f32,
33812 #[doc = "Global Z speed"]
33813 pub z: f32,
33814 #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33815 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33816 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33817 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33818 pub covariance: [f32; 9],
33819 #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33820 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33821 pub reset_counter: u8,
33822}
33823impl VISION_SPEED_ESTIMATE_DATA {
33824 pub const ENCODED_LEN: usize = 57usize;
33825 pub const DEFAULT: Self = Self {
33826 usec: 0_u64,
33827 x: 0.0_f32,
33828 y: 0.0_f32,
33829 z: 0.0_f32,
33830 covariance: [0.0_f32; 9usize],
33831 reset_counter: 0_u8,
33832 };
33833 #[cfg(feature = "arbitrary")]
33834 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33835 use arbitrary::{Arbitrary, Unstructured};
33836 let mut buf = [0u8; 1024];
33837 rng.fill_bytes(&mut buf);
33838 let mut unstructured = Unstructured::new(&buf);
33839 Self::arbitrary(&mut unstructured).unwrap_or_default()
33840 }
33841}
33842impl Default for VISION_SPEED_ESTIMATE_DATA {
33843 fn default() -> Self {
33844 Self::DEFAULT.clone()
33845 }
33846}
33847impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33848 type Message = MavMessage;
33849 const ID: u32 = 103u32;
33850 const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33851 const EXTRA_CRC: u8 = 208u8;
33852 const ENCODED_LEN: usize = 57usize;
33853 fn deser(
33854 _version: MavlinkVersion,
33855 __input: &[u8],
33856 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33857 let avail_len = __input.len();
33858 let mut payload_buf = [0; Self::ENCODED_LEN];
33859 let mut buf = if avail_len < Self::ENCODED_LEN {
33860 payload_buf[0..avail_len].copy_from_slice(__input);
33861 Bytes::new(&payload_buf)
33862 } else {
33863 Bytes::new(__input)
33864 };
33865 let mut __struct = Self::default();
33866 __struct.usec = buf.get_u64_le()?;
33867 __struct.x = buf.get_f32_le()?;
33868 __struct.y = buf.get_f32_le()?;
33869 __struct.z = buf.get_f32_le()?;
33870 for v in &mut __struct.covariance {
33871 let val = buf.get_f32_le()?;
33872 *v = val;
33873 }
33874 __struct.reset_counter = buf.get_u8()?;
33875 Ok(__struct)
33876 }
33877 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33878 let mut __tmp = BytesMut::new(bytes);
33879 #[allow(clippy::absurd_extreme_comparisons)]
33880 #[allow(unused_comparisons)]
33881 if __tmp.remaining() < Self::ENCODED_LEN {
33882 panic!(
33883 "buffer is too small (need {} bytes, but got {})",
33884 Self::ENCODED_LEN,
33885 __tmp.remaining(),
33886 )
33887 }
33888 __tmp.put_u64_le(self.usec);
33889 __tmp.put_f32_le(self.x);
33890 __tmp.put_f32_le(self.y);
33891 __tmp.put_f32_le(self.z);
33892 if matches!(version, MavlinkVersion::V2) {
33893 for val in &self.covariance {
33894 __tmp.put_f32_le(*val);
33895 }
33896 __tmp.put_u8(self.reset_counter);
33897 let len = __tmp.len();
33898 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33899 } else {
33900 __tmp.len()
33901 }
33902 }
33903}
33904#[doc = "Cumulative distance traveled for each reported wheel."]
33905#[doc = ""]
33906#[doc = "ID: 9000"]
33907#[derive(Debug, Clone, PartialEq)]
33908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33910#[cfg_attr(feature = "ts", derive(TS))]
33911#[cfg_attr(feature = "ts", ts(export))]
33912pub struct WHEEL_DISTANCE_DATA {
33913 #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33914 pub time_usec: u64,
33915 #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33916 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33917 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33918 pub distance: [f64; 16],
33919 #[doc = "Number of wheels reported."]
33920 pub count: u8,
33921}
33922impl WHEEL_DISTANCE_DATA {
33923 pub const ENCODED_LEN: usize = 137usize;
33924 pub const DEFAULT: Self = Self {
33925 time_usec: 0_u64,
33926 distance: [0.0_f64; 16usize],
33927 count: 0_u8,
33928 };
33929 #[cfg(feature = "arbitrary")]
33930 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33931 use arbitrary::{Arbitrary, Unstructured};
33932 let mut buf = [0u8; 1024];
33933 rng.fill_bytes(&mut buf);
33934 let mut unstructured = Unstructured::new(&buf);
33935 Self::arbitrary(&mut unstructured).unwrap_or_default()
33936 }
33937}
33938impl Default for WHEEL_DISTANCE_DATA {
33939 fn default() -> Self {
33940 Self::DEFAULT.clone()
33941 }
33942}
33943impl MessageData for WHEEL_DISTANCE_DATA {
33944 type Message = MavMessage;
33945 const ID: u32 = 9000u32;
33946 const NAME: &'static str = "WHEEL_DISTANCE";
33947 const EXTRA_CRC: u8 = 113u8;
33948 const ENCODED_LEN: usize = 137usize;
33949 fn deser(
33950 _version: MavlinkVersion,
33951 __input: &[u8],
33952 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33953 let avail_len = __input.len();
33954 let mut payload_buf = [0; Self::ENCODED_LEN];
33955 let mut buf = if avail_len < Self::ENCODED_LEN {
33956 payload_buf[0..avail_len].copy_from_slice(__input);
33957 Bytes::new(&payload_buf)
33958 } else {
33959 Bytes::new(__input)
33960 };
33961 let mut __struct = Self::default();
33962 __struct.time_usec = buf.get_u64_le()?;
33963 for v in &mut __struct.distance {
33964 let val = buf.get_f64_le()?;
33965 *v = val;
33966 }
33967 __struct.count = buf.get_u8()?;
33968 Ok(__struct)
33969 }
33970 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33971 let mut __tmp = BytesMut::new(bytes);
33972 #[allow(clippy::absurd_extreme_comparisons)]
33973 #[allow(unused_comparisons)]
33974 if __tmp.remaining() < Self::ENCODED_LEN {
33975 panic!(
33976 "buffer is too small (need {} bytes, but got {})",
33977 Self::ENCODED_LEN,
33978 __tmp.remaining(),
33979 )
33980 }
33981 __tmp.put_u64_le(self.time_usec);
33982 for val in &self.distance {
33983 __tmp.put_f64_le(*val);
33984 }
33985 __tmp.put_u8(self.count);
33986 if matches!(version, MavlinkVersion::V2) {
33987 let len = __tmp.len();
33988 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33989 } else {
33990 __tmp.len()
33991 }
33992 }
33993}
33994#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33995#[doc = ""]
33996#[doc = "ID: 299"]
33997#[derive(Debug, Clone, PartialEq)]
33998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34000#[cfg_attr(feature = "ts", derive(TS))]
34001#[cfg_attr(feature = "ts", ts(export))]
34002pub struct WIFI_CONFIG_AP_DATA {
34003 #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
34004 #[cfg_attr(feature = "ts", ts(type = "string"))]
34005 pub ssid: CharArray<32>,
34006 #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
34007 #[cfg_attr(feature = "ts", ts(type = "string"))]
34008 pub password: CharArray<64>,
34009 #[doc = "WiFi Mode."]
34010 #[cfg_attr(feature = "serde", serde(default))]
34011 pub mode: WifiConfigApMode,
34012 #[doc = "Message acceptance response (sent back to GS)."]
34013 #[cfg_attr(feature = "serde", serde(default))]
34014 pub response: WifiConfigApResponse,
34015}
34016impl WIFI_CONFIG_AP_DATA {
34017 pub const ENCODED_LEN: usize = 98usize;
34018 pub const DEFAULT: Self = Self {
34019 ssid: CharArray::new([0_u8; 32usize]),
34020 password: CharArray::new([0_u8; 64usize]),
34021 mode: WifiConfigApMode::DEFAULT,
34022 response: WifiConfigApResponse::DEFAULT,
34023 };
34024 #[cfg(feature = "arbitrary")]
34025 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34026 use arbitrary::{Arbitrary, Unstructured};
34027 let mut buf = [0u8; 1024];
34028 rng.fill_bytes(&mut buf);
34029 let mut unstructured = Unstructured::new(&buf);
34030 Self::arbitrary(&mut unstructured).unwrap_or_default()
34031 }
34032}
34033impl Default for WIFI_CONFIG_AP_DATA {
34034 fn default() -> Self {
34035 Self::DEFAULT.clone()
34036 }
34037}
34038impl MessageData for WIFI_CONFIG_AP_DATA {
34039 type Message = MavMessage;
34040 const ID: u32 = 299u32;
34041 const NAME: &'static str = "WIFI_CONFIG_AP";
34042 const EXTRA_CRC: u8 = 19u8;
34043 const ENCODED_LEN: usize = 98usize;
34044 fn deser(
34045 _version: MavlinkVersion,
34046 __input: &[u8],
34047 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34048 let avail_len = __input.len();
34049 let mut payload_buf = [0; Self::ENCODED_LEN];
34050 let mut buf = if avail_len < Self::ENCODED_LEN {
34051 payload_buf[0..avail_len].copy_from_slice(__input);
34052 Bytes::new(&payload_buf)
34053 } else {
34054 Bytes::new(__input)
34055 };
34056 let mut __struct = Self::default();
34057 let mut tmp = [0_u8; 32usize];
34058 for v in &mut tmp {
34059 *v = buf.get_u8()?;
34060 }
34061 __struct.ssid = CharArray::new(tmp);
34062 let mut tmp = [0_u8; 64usize];
34063 for v in &mut tmp {
34064 *v = buf.get_u8()?;
34065 }
34066 __struct.password = CharArray::new(tmp);
34067 let tmp = buf.get_i8()?;
34068 __struct.mode =
34069 FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34070 enum_type: "WifiConfigApMode",
34071 value: tmp as u64,
34072 })?;
34073 let tmp = buf.get_i8()?;
34074 __struct.response =
34075 FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34076 enum_type: "WifiConfigApResponse",
34077 value: tmp as u64,
34078 })?;
34079 Ok(__struct)
34080 }
34081 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34082 let mut __tmp = BytesMut::new(bytes);
34083 #[allow(clippy::absurd_extreme_comparisons)]
34084 #[allow(unused_comparisons)]
34085 if __tmp.remaining() < Self::ENCODED_LEN {
34086 panic!(
34087 "buffer is too small (need {} bytes, but got {})",
34088 Self::ENCODED_LEN,
34089 __tmp.remaining(),
34090 )
34091 }
34092 for val in &self.ssid {
34093 __tmp.put_u8(*val);
34094 }
34095 for val in &self.password {
34096 __tmp.put_u8(*val);
34097 }
34098 if matches!(version, MavlinkVersion::V2) {
34099 __tmp.put_i8(self.mode as i8);
34100 __tmp.put_i8(self.response as i8);
34101 let len = __tmp.len();
34102 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34103 } else {
34104 __tmp.len()
34105 }
34106 }
34107}
34108#[doc = "Winch status."]
34109#[doc = ""]
34110#[doc = "ID: 9005"]
34111#[derive(Debug, Clone, PartialEq)]
34112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34114#[cfg_attr(feature = "ts", derive(TS))]
34115#[cfg_attr(feature = "ts", ts(export))]
34116pub struct WINCH_STATUS_DATA {
34117 #[doc = "Timestamp (synced to UNIX time or since system boot)."]
34118 pub time_usec: u64,
34119 #[doc = "Length of line released. NaN if unknown"]
34120 pub line_length: f32,
34121 #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
34122 pub speed: f32,
34123 #[doc = "Tension on the line. NaN if unknown"]
34124 pub tension: f32,
34125 #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
34126 pub voltage: f32,
34127 #[doc = "Current draw from the winch. NaN if unknown"]
34128 pub current: f32,
34129 #[doc = "Status flags"]
34130 pub status: MavWinchStatusFlag,
34131 #[doc = "Temperature of the motor. INT16_MAX if unknown"]
34132 pub temperature: i16,
34133}
34134impl WINCH_STATUS_DATA {
34135 pub const ENCODED_LEN: usize = 34usize;
34136 pub const DEFAULT: Self = Self {
34137 time_usec: 0_u64,
34138 line_length: 0.0_f32,
34139 speed: 0.0_f32,
34140 tension: 0.0_f32,
34141 voltage: 0.0_f32,
34142 current: 0.0_f32,
34143 status: MavWinchStatusFlag::DEFAULT,
34144 temperature: 0_i16,
34145 };
34146 #[cfg(feature = "arbitrary")]
34147 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34148 use arbitrary::{Arbitrary, Unstructured};
34149 let mut buf = [0u8; 1024];
34150 rng.fill_bytes(&mut buf);
34151 let mut unstructured = Unstructured::new(&buf);
34152 Self::arbitrary(&mut unstructured).unwrap_or_default()
34153 }
34154}
34155impl Default for WINCH_STATUS_DATA {
34156 fn default() -> Self {
34157 Self::DEFAULT.clone()
34158 }
34159}
34160impl MessageData for WINCH_STATUS_DATA {
34161 type Message = MavMessage;
34162 const ID: u32 = 9005u32;
34163 const NAME: &'static str = "WINCH_STATUS";
34164 const EXTRA_CRC: u8 = 117u8;
34165 const ENCODED_LEN: usize = 34usize;
34166 fn deser(
34167 _version: MavlinkVersion,
34168 __input: &[u8],
34169 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34170 let avail_len = __input.len();
34171 let mut payload_buf = [0; Self::ENCODED_LEN];
34172 let mut buf = if avail_len < Self::ENCODED_LEN {
34173 payload_buf[0..avail_len].copy_from_slice(__input);
34174 Bytes::new(&payload_buf)
34175 } else {
34176 Bytes::new(__input)
34177 };
34178 let mut __struct = Self::default();
34179 __struct.time_usec = buf.get_u64_le()?;
34180 __struct.line_length = buf.get_f32_le()?;
34181 __struct.speed = buf.get_f32_le()?;
34182 __struct.tension = buf.get_f32_le()?;
34183 __struct.voltage = buf.get_f32_le()?;
34184 __struct.current = buf.get_f32_le()?;
34185 let tmp = buf.get_u32_le()?;
34186 __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
34187 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34188 flag_type: "MavWinchStatusFlag",
34189 value: tmp as u64,
34190 })?;
34191 __struct.temperature = buf.get_i16_le()?;
34192 Ok(__struct)
34193 }
34194 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34195 let mut __tmp = BytesMut::new(bytes);
34196 #[allow(clippy::absurd_extreme_comparisons)]
34197 #[allow(unused_comparisons)]
34198 if __tmp.remaining() < Self::ENCODED_LEN {
34199 panic!(
34200 "buffer is too small (need {} bytes, but got {})",
34201 Self::ENCODED_LEN,
34202 __tmp.remaining(),
34203 )
34204 }
34205 __tmp.put_u64_le(self.time_usec);
34206 __tmp.put_f32_le(self.line_length);
34207 __tmp.put_f32_le(self.speed);
34208 __tmp.put_f32_le(self.tension);
34209 __tmp.put_f32_le(self.voltage);
34210 __tmp.put_f32_le(self.current);
34211 __tmp.put_u32_le(self.status.bits() as u32);
34212 __tmp.put_i16_le(self.temperature);
34213 if matches!(version, MavlinkVersion::V2) {
34214 let len = __tmp.len();
34215 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34216 } else {
34217 __tmp.len()
34218 }
34219 }
34220}
34221#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34222#[doc = ""]
34223#[doc = "ID: 231"]
34224#[derive(Debug, Clone, PartialEq)]
34225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34227#[cfg_attr(feature = "ts", derive(TS))]
34228#[cfg_attr(feature = "ts", ts(export))]
34229pub struct WIND_COV_DATA {
34230 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34231 pub time_usec: u64,
34232 #[doc = "Wind in North (NED) direction (NAN if unknown)"]
34233 pub wind_x: f32,
34234 #[doc = "Wind in East (NED) direction (NAN if unknown)"]
34235 pub wind_y: f32,
34236 #[doc = "Wind in down (NED) direction (NAN if unknown)"]
34237 pub wind_z: f32,
34238 #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34239 pub var_horiz: f32,
34240 #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34241 pub var_vert: f32,
34242 #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
34243 pub wind_alt: f32,
34244 #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
34245 pub horiz_accuracy: f32,
34246 #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
34247 pub vert_accuracy: f32,
34248}
34249impl WIND_COV_DATA {
34250 pub const ENCODED_LEN: usize = 40usize;
34251 pub const DEFAULT: Self = Self {
34252 time_usec: 0_u64,
34253 wind_x: 0.0_f32,
34254 wind_y: 0.0_f32,
34255 wind_z: 0.0_f32,
34256 var_horiz: 0.0_f32,
34257 var_vert: 0.0_f32,
34258 wind_alt: 0.0_f32,
34259 horiz_accuracy: 0.0_f32,
34260 vert_accuracy: 0.0_f32,
34261 };
34262 #[cfg(feature = "arbitrary")]
34263 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34264 use arbitrary::{Arbitrary, Unstructured};
34265 let mut buf = [0u8; 1024];
34266 rng.fill_bytes(&mut buf);
34267 let mut unstructured = Unstructured::new(&buf);
34268 Self::arbitrary(&mut unstructured).unwrap_or_default()
34269 }
34270}
34271impl Default for WIND_COV_DATA {
34272 fn default() -> Self {
34273 Self::DEFAULT.clone()
34274 }
34275}
34276impl MessageData for WIND_COV_DATA {
34277 type Message = MavMessage;
34278 const ID: u32 = 231u32;
34279 const NAME: &'static str = "WIND_COV";
34280 const EXTRA_CRC: u8 = 105u8;
34281 const ENCODED_LEN: usize = 40usize;
34282 fn deser(
34283 _version: MavlinkVersion,
34284 __input: &[u8],
34285 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34286 let avail_len = __input.len();
34287 let mut payload_buf = [0; Self::ENCODED_LEN];
34288 let mut buf = if avail_len < Self::ENCODED_LEN {
34289 payload_buf[0..avail_len].copy_from_slice(__input);
34290 Bytes::new(&payload_buf)
34291 } else {
34292 Bytes::new(__input)
34293 };
34294 let mut __struct = Self::default();
34295 __struct.time_usec = buf.get_u64_le()?;
34296 __struct.wind_x = buf.get_f32_le()?;
34297 __struct.wind_y = buf.get_f32_le()?;
34298 __struct.wind_z = buf.get_f32_le()?;
34299 __struct.var_horiz = buf.get_f32_le()?;
34300 __struct.var_vert = buf.get_f32_le()?;
34301 __struct.wind_alt = buf.get_f32_le()?;
34302 __struct.horiz_accuracy = buf.get_f32_le()?;
34303 __struct.vert_accuracy = buf.get_f32_le()?;
34304 Ok(__struct)
34305 }
34306 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34307 let mut __tmp = BytesMut::new(bytes);
34308 #[allow(clippy::absurd_extreme_comparisons)]
34309 #[allow(unused_comparisons)]
34310 if __tmp.remaining() < Self::ENCODED_LEN {
34311 panic!(
34312 "buffer is too small (need {} bytes, but got {})",
34313 Self::ENCODED_LEN,
34314 __tmp.remaining(),
34315 )
34316 }
34317 __tmp.put_u64_le(self.time_usec);
34318 __tmp.put_f32_le(self.wind_x);
34319 __tmp.put_f32_le(self.wind_y);
34320 __tmp.put_f32_le(self.wind_z);
34321 __tmp.put_f32_le(self.var_horiz);
34322 __tmp.put_f32_le(self.var_vert);
34323 __tmp.put_f32_le(self.wind_alt);
34324 __tmp.put_f32_le(self.horiz_accuracy);
34325 __tmp.put_f32_le(self.vert_accuracy);
34326 if matches!(version, MavlinkVersion::V2) {
34327 let len = __tmp.len();
34328 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34329 } else {
34330 __tmp.len()
34331 }
34332 }
34333}
34334#[derive(Clone, PartialEq, Debug)]
34335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34336#[cfg_attr(feature = "serde", serde(tag = "type"))]
34337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34338#[cfg_attr(feature = "ts", derive(TS))]
34339#[cfg_attr(feature = "ts", ts(export))]
34340#[repr(u32)]
34341pub enum MavMessage {
34342 #[doc = "Set the vehicle attitude and body angular rates."]
34343 #[doc = ""]
34344 #[doc = "ID: 140"]
34345 ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
34346 #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
34347 #[doc = ""]
34348 #[doc = "ID: 375"]
34349 ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
34350 #[doc = "The location and information of an ADSB vehicle."]
34351 #[doc = ""]
34352 #[doc = "ID: 246"]
34353 ADSB_VEHICLE(ADSB_VEHICLE_DATA),
34354 #[doc = "The location and information of an AIS vessel."]
34355 #[doc = ""]
34356 #[doc = "ID: 301"]
34357 AIS_VESSEL(AIS_VESSEL_DATA),
34358 #[doc = "The current system altitude."]
34359 #[doc = ""]
34360 #[doc = "ID: 141"]
34361 ALTITUDE(ALTITUDE_DATA),
34362 #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
34363 #[doc = ""]
34364 #[doc = "ID: 30"]
34365 ATTITUDE(ATTITUDE_DATA),
34366 #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34367 #[doc = ""]
34368 #[doc = "ID: 31"]
34369 ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
34370 #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34371 #[doc = ""]
34372 #[doc = "ID: 61"]
34373 ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
34374 #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
34375 #[doc = ""]
34376 #[doc = "ID: 83"]
34377 ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
34378 #[doc = "Motion capture attitude and position."]
34379 #[doc = ""]
34380 #[doc = "ID: 138"]
34381 ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
34382 #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
34383 #[doc = ""]
34384 #[doc = "ID: 7"]
34385 AUTH_KEY(AUTH_KEY_DATA),
34386 #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
34387 #[doc = ""]
34388 #[doc = "ID: 286"]
34389 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
34390 #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
34391 #[doc = ""]
34392 #[doc = "ID: 148"]
34393 AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
34394 #[doc = "Information about a flight mode. The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE. Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode. The modes must be available/settable for the current vehicle/frame type. Each mode should only be emitted once (even if it is both standard and custom). Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed. See <https://mavlink.io/en/services/standard_modes.html>."]
34395 #[doc = ""]
34396 #[doc = "ID: 435"]
34397 AVAILABLE_MODES(AVAILABLE_MODES_DATA),
34398 #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed. A receiver must re-request all available modes whenever the sequence number changes. This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change. See <https://mavlink.io/en/services/standard_modes.html>."]
34399 #[doc = ""]
34400 #[doc = "ID: 437"]
34401 AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
34402 #[doc = "Battery information that is static, or requires infrequent update. This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate. BATTERY_STATUS_V2 is used for higher-rate battery status information."]
34403 #[doc = ""]
34404 #[doc = "ID: 372"]
34405 BATTERY_INFO(BATTERY_INFO_DATA),
34406 #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
34407 #[doc = ""]
34408 #[doc = "ID: 147"]
34409 BATTERY_STATUS(BATTERY_STATUS_DATA),
34410 #[doc = "Report button state change."]
34411 #[doc = ""]
34412 #[doc = "ID: 257"]
34413 BUTTON_CHANGE(BUTTON_CHANGE_DATA),
34414 #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34415 #[doc = ""]
34416 #[doc = "ID: 262"]
34417 CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
34418 #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34419 #[doc = ""]
34420 #[doc = "ID: 271"]
34421 CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
34422 #[doc = "Information about a captured image. This is emitted every time a message is captured. MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers: MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers. MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send: set to 0 (default) to send just the the message for the sequence number in param 2, set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers, set to the sequence number of the final message in the range."]
34423 #[doc = ""]
34424 #[doc = "ID: 263"]
34425 CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
34426 #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34427 #[doc = ""]
34428 #[doc = "ID: 259"]
34429 CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
34430 #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34431 #[doc = ""]
34432 #[doc = "ID: 260"]
34433 CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
34434 #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
34435 #[doc = ""]
34436 #[doc = "ID: 277"]
34437 CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
34438 #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34439 #[doc = ""]
34440 #[doc = "ID: 276"]
34441 CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
34442 #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34443 #[doc = ""]
34444 #[doc = "ID: 275"]
34445 CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
34446 #[doc = "Camera-IMU triggering and synchronisation message."]
34447 #[doc = ""]
34448 #[doc = "ID: 112"]
34449 CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
34450 #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
34451 #[doc = ""]
34452 #[doc = "ID: 387"]
34453 CANFD_FRAME(CANFD_FRAME_DATA),
34454 #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
34455 #[doc = ""]
34456 #[doc = "ID: 388"]
34457 CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
34458 #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
34459 #[doc = ""]
34460 #[doc = "ID: 386"]
34461 CAN_FRAME(CAN_FRAME_DATA),
34462 #[doc = "Configure cellular modems. This message is re-emitted as an acknowledgement by the modem. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34463 #[doc = ""]
34464 #[doc = "ID: 336"]
34465 CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
34466 #[doc = "Report current used cellular network status."]
34467 #[doc = ""]
34468 #[doc = "ID: 334"]
34469 CELLULAR_STATUS(CELLULAR_STATUS_DATA),
34470 #[doc = "Request to control this MAV."]
34471 #[doc = ""]
34472 #[doc = "ID: 5"]
34473 CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
34474 #[doc = "Accept / deny control of this MAV."]
34475 #[doc = ""]
34476 #[doc = "ID: 6"]
34477 CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
34478 #[doc = "Information about a potential collision."]
34479 #[doc = ""]
34480 #[doc = "ID: 247"]
34481 COLLISION(COLLISION_DATA),
34482 #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34483 #[doc = ""]
34484 #[doc = "ID: 77"]
34485 COMMAND_ACK(COMMAND_ACK_DATA),
34486 #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34487 #[doc = ""]
34488 #[doc = "ID: 80"]
34489 COMMAND_CANCEL(COMMAND_CANCEL_DATA),
34490 #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34491 #[doc = ""]
34492 #[doc = "ID: 75"]
34493 COMMAND_INT(COMMAND_INT_DATA),
34494 #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34495 #[doc = ""]
34496 #[doc = "ID: 76"]
34497 COMMAND_LONG(COMMAND_LONG_DATA),
34498 #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
34499 #[doc = ""]
34500 #[doc = "ID: 395"]
34501 #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
34502 COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
34503 #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
34504 #[doc = ""]
34505 #[doc = "ID: 396"]
34506 COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
34507 #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE. This contains the MAVLink FTP URI and CRC for the component's general metadata file. The file must be hosted on the component, and may be xz compressed. The file CRC can be used for file caching. The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet. For more information see: <https://mavlink.io/en/services/component_information.html>. Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
34508 #[doc = ""]
34509 #[doc = "ID: 397"]
34510 COMPONENT_METADATA(COMPONENT_METADATA_DATA),
34511 #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
34512 #[doc = ""]
34513 #[doc = "ID: 146"]
34514 CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
34515 #[doc = "offset response to encapsulated data."]
34516 #[doc = ""]
34517 #[doc = "ID: 50005"]
34518 CUBEPILOT_FIRMWARE_UPDATE_RESP(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA),
34519 #[doc = "Start firmware update with encapsulated data."]
34520 #[doc = ""]
34521 #[doc = "ID: 50004"]
34522 CUBEPILOT_FIRMWARE_UPDATE_START(CUBEPILOT_FIRMWARE_UPDATE_START_DATA),
34523 #[doc = "Raw RC Data."]
34524 #[doc = ""]
34525 #[doc = "ID: 50001"]
34526 CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA),
34527 #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
34528 #[doc = ""]
34529 #[doc = "ID: 411"]
34530 CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
34531 #[doc = "Get the current mode. This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz). It may be requested using MAV_CMD_REQUEST_MESSAGE. See <https://mavlink.io/en/services/standard_modes.html>."]
34532 #[doc = ""]
34533 #[doc = "ID: 436"]
34534 CURRENT_MODE(CURRENT_MODE_DATA),
34535 #[doc = "Data stream status information."]
34536 #[doc = ""]
34537 #[doc = "ID: 67"]
34538 #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
34539 DATA_STREAM(DATA_STREAM_DATA),
34540 #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34541 #[doc = ""]
34542 #[doc = "ID: 130"]
34543 DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
34544 #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
34545 #[doc = ""]
34546 #[doc = "ID: 254"]
34547 DEBUG(DEBUG_DATA),
34548 #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
34549 #[doc = ""]
34550 #[doc = "ID: 350"]
34551 DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
34552 #[doc = "To debug something using a named 3D vector."]
34553 #[doc = ""]
34554 #[doc = "ID: 250"]
34555 DEBUG_VECT(DEBUG_VECT_DATA),
34556 #[doc = "Distance sensor information for an onboard rangefinder."]
34557 #[doc = ""]
34558 #[doc = "ID: 132"]
34559 DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
34560 #[doc = "EFI status output."]
34561 #[doc = ""]
34562 #[doc = "ID: 225"]
34563 EFI_STATUS(EFI_STATUS_DATA),
34564 #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34565 #[doc = ""]
34566 #[doc = "ID: 131"]
34567 ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
34568 #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
34569 #[doc = ""]
34570 #[doc = "ID: 290"]
34571 ESC_INFO(ESC_INFO_DATA),
34572 #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
34573 #[doc = ""]
34574 #[doc = "ID: 291"]
34575 ESC_STATUS(ESC_STATUS_DATA),
34576 #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
34577 #[doc = ""]
34578 #[doc = "ID: 230"]
34579 ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
34580 #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
34581 #[doc = ""]
34582 #[doc = "ID: 410"]
34583 EVENT(EVENT_DATA),
34584 #[doc = "Provides state for additional features."]
34585 #[doc = ""]
34586 #[doc = "ID: 245"]
34587 EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
34588 #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
34589 #[doc = ""]
34590 #[doc = "ID: 162"]
34591 FENCE_STATUS(FENCE_STATUS_DATA),
34592 #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
34593 #[doc = ""]
34594 #[doc = "ID: 110"]
34595 FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
34596 #[doc = "Flight information. This includes time since boot for arm, takeoff, and land, and a flight number. Takeoff and landing values reset to zero on arm. This can be requested using MAV_CMD_REQUEST_MESSAGE. Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
34597 #[doc = ""]
34598 #[doc = "ID: 264"]
34599 FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
34600 #[doc = "Current motion information from a designated system."]
34601 #[doc = ""]
34602 #[doc = "ID: 144"]
34603 FOLLOW_TARGET(FOLLOW_TARGET_DATA),
34604 #[doc = "Fuel status. This message provides \"generic\" fuel level information for in a GCS and for triggering failsafes in an autopilot. The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE. The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value. A recipient can assume that if these fields are supplied they are accurate. If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume). Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot). This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2. If both messages are sent for the same fuel system, the ids and corresponding information must match. This should be streamed (nominally at 0.1 Hz)."]
34605 #[doc = ""]
34606 #[doc = "ID: 371"]
34607 FUEL_STATUS(FUEL_STATUS_DATA),
34608 #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
34609 #[doc = ""]
34610 #[doc = "ID: 373"]
34611 GENERATOR_STATUS(GENERATOR_STATUS_DATA),
34612 #[doc = "Message reporting the status of a gimbal device. \t This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t For the angles encoded in the quaternion and the angular velocities holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t If neither of these flags are set, then (for backwards compatibility) it holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t else they are relative to the vehicle heading (vehicle frame). \t Other conditions of the flags are not allowed. \t The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
34613 #[doc = ""]
34614 #[doc = "ID: 285"]
34615 GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
34616 #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
34617 #[doc = ""]
34618 #[doc = "ID: 283"]
34619 GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
34620 #[doc = "Low level message to control a gimbal device's attitude. \t This message is to be sent from the gimbal manager to the gimbal device component. \t The quaternion and angular velocities can be set to NaN according to use case. \t For the angles encoded in the quaternion and the angular velocities holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t If neither of these flags are set, then (for backwards compatibility) it holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t else they are relative to the vehicle heading (vehicle frame). \t Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t These rules are to ensure backwards compatibility. \t New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
34621 #[doc = ""]
34622 #[doc = "ID: 284"]
34623 GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
34624 #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
34625 #[doc = ""]
34626 #[doc = "ID: 280"]
34627 GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
34628 #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34629 #[doc = ""]
34630 #[doc = "ID: 282"]
34631 GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
34632 #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34633 #[doc = ""]
34634 #[doc = "ID: 288"]
34635 GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
34636 #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
34637 #[doc = ""]
34638 #[doc = "ID: 287"]
34639 GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
34640 #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
34641 #[doc = ""]
34642 #[doc = "ID: 281"]
34643 GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
34644 #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient."]
34645 #[doc = ""]
34646 #[doc = "ID: 33"]
34647 GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
34648 #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
34649 #[doc = ""]
34650 #[doc = "ID: 63"]
34651 GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
34652 #[doc = "Global position/attitude estimate from a vision source."]
34653 #[doc = ""]
34654 #[doc = "ID: 101"]
34655 GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
34656 #[doc = "Second GPS data."]
34657 #[doc = ""]
34658 #[doc = "ID: 124"]
34659 GPS2_RAW(GPS2_RAW_DATA),
34660 #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34661 #[doc = ""]
34662 #[doc = "ID: 128"]
34663 GPS2_RTK(GPS2_RTK_DATA),
34664 #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
34665 #[doc = ""]
34666 #[doc = "ID: 49"]
34667 GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
34668 #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
34669 #[doc = ""]
34670 #[doc = "ID: 123"]
34671 #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
34672 GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
34673 #[doc = "GPS sensor input message. This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
34674 #[doc = ""]
34675 #[doc = "ID: 232"]
34676 GPS_INPUT(GPS_INPUT_DATA),
34677 #[doc = "The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34678 #[doc = ""]
34679 #[doc = "ID: 24"]
34680 GPS_RAW_INT(GPS_RAW_INT_DATA),
34681 #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
34682 #[doc = ""]
34683 #[doc = "ID: 233"]
34684 GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34685 #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34686 #[doc = ""]
34687 #[doc = "ID: 127"]
34688 GPS_RTK(GPS_RTK_DATA),
34689 #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34690 #[doc = ""]
34691 #[doc = "ID: 25"]
34692 GPS_STATUS(GPS_STATUS_DATA),
34693 #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34694 #[doc = ""]
34695 #[doc = "ID: 0"]
34696 HEARTBEAT(HEARTBEAT_DATA),
34697 #[doc = "Herelink Telemetry."]
34698 #[doc = ""]
34699 #[doc = "ID: 50003"]
34700 HERELINK_TELEM(HERELINK_TELEM_DATA),
34701 #[doc = "Information about video stream."]
34702 #[doc = ""]
34703 #[doc = "ID: 50002"]
34704 HERELINK_VIDEO_STREAM_INFORMATION(HERELINK_VIDEO_STREAM_INFORMATION_DATA),
34705 #[doc = "The IMU readings in SI units in NED body frame."]
34706 #[doc = ""]
34707 #[doc = "ID: 105"]
34708 HIGHRES_IMU(HIGHRES_IMU_DATA),
34709 #[doc = "Message appropriate for high latency connections like Iridium."]
34710 #[doc = ""]
34711 #[doc = "ID: 234"]
34712 #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34713 HIGH_LATENCY(HIGH_LATENCY_DATA),
34714 #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34715 #[doc = ""]
34716 #[doc = "ID: 235"]
34717 HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34718 #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34719 #[doc = ""]
34720 #[doc = "ID: 93"]
34721 HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34722 #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34723 #[doc = ""]
34724 #[doc = "ID: 91"]
34725 HIL_CONTROLS(HIL_CONTROLS_DATA),
34726 #[doc = "The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34727 #[doc = ""]
34728 #[doc = "ID: 113"]
34729 HIL_GPS(HIL_GPS_DATA),
34730 #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34731 #[doc = ""]
34732 #[doc = "ID: 114"]
34733 HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34734 #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34735 #[doc = ""]
34736 #[doc = "ID: 92"]
34737 HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34738 #[doc = "The IMU readings in SI units in NED body frame."]
34739 #[doc = ""]
34740 #[doc = "ID: 107"]
34741 HIL_SENSOR(HIL_SENSOR_DATA),
34742 #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34743 #[doc = ""]
34744 #[doc = "ID: 90"]
34745 #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34746 HIL_STATE(HIL_STATE_DATA),
34747 #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34748 #[doc = ""]
34749 #[doc = "ID: 115"]
34750 HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34751 #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34752 #[doc = ""]
34753 #[doc = "ID: 242"]
34754 HOME_POSITION(HOME_POSITION_DATA),
34755 #[doc = "Temperature and humidity from hygrometer."]
34756 #[doc = ""]
34757 #[doc = "ID: 12920"]
34758 HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34759 #[doc = "Illuminator status."]
34760 #[doc = ""]
34761 #[doc = "ID: 440"]
34762 ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34763 #[doc = "Status of the Iridium SBD link."]
34764 #[doc = ""]
34765 #[doc = "ID: 335"]
34766 ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34767 #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34768 #[doc = ""]
34769 #[doc = "ID: 149"]
34770 LANDING_TARGET(LANDING_TARGET_DATA),
34771 #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34772 #[doc = ""]
34773 #[doc = "ID: 8"]
34774 LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34775 #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34776 #[doc = ""]
34777 #[doc = "ID: 32"]
34778 LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34779 #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34780 #[doc = ""]
34781 #[doc = "ID: 64"]
34782 LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34783 #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34784 #[doc = ""]
34785 #[doc = "ID: 89"]
34786 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34787 #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34788 #[doc = ""]
34789 #[doc = "ID: 268"]
34790 LOGGING_ACK(LOGGING_ACK_DATA),
34791 #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34792 #[doc = ""]
34793 #[doc = "ID: 266"]
34794 LOGGING_DATA(LOGGING_DATA_DATA),
34795 #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34796 #[doc = ""]
34797 #[doc = "ID: 267"]
34798 LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34799 #[doc = "Reply to LOG_REQUEST_DATA."]
34800 #[doc = ""]
34801 #[doc = "ID: 120"]
34802 LOG_DATA(LOG_DATA_DATA),
34803 #[doc = "Reply to LOG_REQUEST_LIST."]
34804 #[doc = ""]
34805 #[doc = "ID: 118"]
34806 LOG_ENTRY(LOG_ENTRY_DATA),
34807 #[doc = "Erase all logs."]
34808 #[doc = ""]
34809 #[doc = "ID: 121"]
34810 LOG_ERASE(LOG_ERASE_DATA),
34811 #[doc = "Request a chunk of a log."]
34812 #[doc = ""]
34813 #[doc = "ID: 119"]
34814 LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34815 #[doc = "Stop log transfer and resume normal logging."]
34816 #[doc = ""]
34817 #[doc = "ID: 122"]
34818 LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34819 #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34820 #[doc = ""]
34821 #[doc = "ID: 117"]
34822 LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34823 #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34824 #[doc = ""]
34825 #[doc = "ID: 192"]
34826 MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34827 #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34828 #[doc = ""]
34829 #[doc = "ID: 69"]
34830 MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34831 #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34832 #[doc = ""]
34833 #[doc = "ID: 81"]
34834 MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34835 #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34836 #[doc = ""]
34837 #[doc = "ID: 249"]
34838 MEMORY_VECT(MEMORY_VECT_DATA),
34839 #[doc = "The interval between messages for a particular MAVLink message ID. This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34840 #[doc = ""]
34841 #[doc = "ID: 244"]
34842 MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34843 #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34844 #[doc = ""]
34845 #[doc = "ID: 47"]
34846 MISSION_ACK(MISSION_ACK_DATA),
34847 #[doc = "Delete all mission items at once."]
34848 #[doc = ""]
34849 #[doc = "ID: 45"]
34850 MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34851 #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34852 #[doc = ""]
34853 #[doc = "ID: 44"]
34854 MISSION_COUNT(MISSION_COUNT_DATA),
34855 #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running). This message should be streamed all the time (nominally at 1Hz). This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34856 #[doc = ""]
34857 #[doc = "ID: 42"]
34858 MISSION_CURRENT(MISSION_CURRENT_DATA),
34859 #[doc = "Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34860 #[doc = ""]
34861 #[doc = "ID: 39"]
34862 #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34863 MISSION_ITEM(MISSION_ITEM_DATA),
34864 #[doc = "Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34865 #[doc = ""]
34866 #[doc = "ID: 73"]
34867 MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34868 #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34869 #[doc = ""]
34870 #[doc = "ID: 46"]
34871 MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34872 #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34873 #[doc = ""]
34874 #[doc = "ID: 40"]
34875 #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34876 MISSION_REQUEST(MISSION_REQUEST_DATA),
34877 #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34878 #[doc = ""]
34879 #[doc = "ID: 51"]
34880 MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34881 #[doc = "Request the overall list of mission items from the system/component."]
34882 #[doc = ""]
34883 #[doc = "ID: 43"]
34884 MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34885 #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34886 #[doc = ""]
34887 #[doc = "ID: 37"]
34888 MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34889 #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2). This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. If the system is not in mission mode this message must not trigger a switch to mission mode."]
34890 #[doc = ""]
34891 #[doc = "ID: 41"]
34892 #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34893 MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34894 #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34895 #[doc = ""]
34896 #[doc = "ID: 38"]
34897 MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34898 #[doc = "Orientation of a mount."]
34899 #[doc = ""]
34900 #[doc = "ID: 265"]
34901 #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34902 MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34903 #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34904 #[doc = ""]
34905 #[doc = "ID: 251"]
34906 NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34907 #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34908 #[doc = ""]
34909 #[doc = "ID: 252"]
34910 NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34911 #[doc = "The state of the navigation and position controller."]
34912 #[doc = ""]
34913 #[doc = "ID: 62"]
34914 NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34915 #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34916 #[doc = ""]
34917 #[doc = "ID: 330"]
34918 OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34919 #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34920 #[doc = ""]
34921 #[doc = "ID: 331"]
34922 ODOMETRY(ODOMETRY_DATA),
34923 #[doc = "Hardware status sent by an onboard computer."]
34924 #[doc = ""]
34925 #[doc = "ID: 390"]
34926 ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34927 #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34928 #[doc = ""]
34929 #[doc = "ID: 12918"]
34930 OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34931 #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34932 #[doc = ""]
34933 #[doc = "ID: 12902"]
34934 OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34935 #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34936 #[doc = ""]
34937 #[doc = "ID: 12900"]
34938 OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34939 #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34940 #[doc = ""]
34941 #[doc = "ID: 12901"]
34942 OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34943 #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34944 #[doc = ""]
34945 #[doc = "ID: 12915"]
34946 OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34947 #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34948 #[doc = ""]
34949 #[doc = "ID: 12905"]
34950 OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34951 #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34952 #[doc = ""]
34953 #[doc = "ID: 12903"]
34954 OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34955 #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34956 #[doc = ""]
34957 #[doc = "ID: 12904"]
34958 OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34959 #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34960 #[doc = ""]
34961 #[doc = "ID: 12919"]
34962 OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34963 #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34964 #[doc = ""]
34965 #[doc = "ID: 100"]
34966 OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34967 #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34968 #[doc = ""]
34969 #[doc = "ID: 106"]
34970 OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34971 #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34972 #[doc = ""]
34973 #[doc = "ID: 360"]
34974 ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34975 #[doc = "Response from a PARAM_EXT_SET message."]
34976 #[doc = ""]
34977 #[doc = "ID: 324"]
34978 PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34979 #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34980 #[doc = ""]
34981 #[doc = "ID: 321"]
34982 PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34983 #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34984 #[doc = ""]
34985 #[doc = "ID: 320"]
34986 PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34987 #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34988 #[doc = ""]
34989 #[doc = "ID: 323"]
34990 PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34991 #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34992 #[doc = ""]
34993 #[doc = "ID: 322"]
34994 PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34995 #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34996 #[doc = ""]
34997 #[doc = "ID: 50"]
34998 PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34999 #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35000 #[doc = ""]
35001 #[doc = "ID: 21"]
35002 PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
35003 #[doc = "Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] ->value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
35004 #[doc = ""]
35005 #[doc = "ID: 20"]
35006 PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
35007 #[doc = "Set a parameter value (write new value to permanent storage). The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35008 #[doc = ""]
35009 #[doc = "ID: 23"]
35010 PARAM_SET(PARAM_SET_DATA),
35011 #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35012 #[doc = ""]
35013 #[doc = "ID: 22"]
35014 PARAM_VALUE(PARAM_VALUE_DATA),
35015 #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
35016 #[doc = ""]
35017 #[doc = "ID: 4"]
35018 #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
35019 PING(PING_DATA),
35020 #[doc = "Control vehicle tone generation (buzzer)."]
35021 #[doc = ""]
35022 #[doc = "ID: 258"]
35023 #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
35024 PLAY_TUNE(PLAY_TUNE_DATA),
35025 #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
35026 #[doc = ""]
35027 #[doc = "ID: 400"]
35028 PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
35029 #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
35030 #[doc = ""]
35031 #[doc = "ID: 87"]
35032 POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
35033 #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
35034 #[doc = ""]
35035 #[doc = "ID: 85"]
35036 POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
35037 #[doc = "Power supply status."]
35038 #[doc = ""]
35039 #[doc = "ID: 125"]
35040 POWER_STATUS(POWER_STATUS_DATA),
35041 #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
35042 #[doc = ""]
35043 #[doc = "ID: 300"]
35044 PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
35045 #[doc = "Status generated by radio and injected into MAVLink stream."]
35046 #[doc = ""]
35047 #[doc = "ID: 109"]
35048 RADIO_STATUS(RADIO_STATUS_DATA),
35049 #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
35050 #[doc = ""]
35051 #[doc = "ID: 27"]
35052 RAW_IMU(RAW_IMU_DATA),
35053 #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
35054 #[doc = ""]
35055 #[doc = "ID: 28"]
35056 RAW_PRESSURE(RAW_PRESSURE_DATA),
35057 #[doc = "RPM sensor data message."]
35058 #[doc = ""]
35059 #[doc = "ID: 339"]
35060 RAW_RPM(RAW_RPM_DATA),
35061 #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
35062 #[doc = ""]
35063 #[doc = "ID: 65"]
35064 RC_CHANNELS(RC_CHANNELS_DATA),
35065 #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
35066 #[doc = ""]
35067 #[doc = "ID: 70"]
35068 RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
35069 #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
35070 #[doc = ""]
35071 #[doc = "ID: 35"]
35072 RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
35073 #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
35074 #[doc = ""]
35075 #[doc = "ID: 34"]
35076 RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
35077 #[doc = "Request a data stream."]
35078 #[doc = ""]
35079 #[doc = "ID: 66"]
35080 #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
35081 REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
35082 #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
35083 #[doc = ""]
35084 #[doc = "ID: 412"]
35085 REQUEST_EVENT(REQUEST_EVENT_DATA),
35086 #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
35087 #[doc = ""]
35088 #[doc = "ID: 142"]
35089 RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
35090 #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
35091 #[doc = ""]
35092 #[doc = "ID: 413"]
35093 RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
35094 #[doc = "Read out the safety zone the MAV currently assumes."]
35095 #[doc = ""]
35096 #[doc = "ID: 55"]
35097 SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
35098 #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
35099 #[doc = ""]
35100 #[doc = "ID: 54"]
35101 SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
35102 #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
35103 #[doc = ""]
35104 #[doc = "ID: 26"]
35105 SCALED_IMU(SCALED_IMU_DATA),
35106 #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
35107 #[doc = ""]
35108 #[doc = "ID: 116"]
35109 SCALED_IMU2(SCALED_IMU2_DATA),
35110 #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
35111 #[doc = ""]
35112 #[doc = "ID: 129"]
35113 SCALED_IMU3(SCALED_IMU3_DATA),
35114 #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
35115 #[doc = ""]
35116 #[doc = "ID: 29"]
35117 SCALED_PRESSURE(SCALED_PRESSURE_DATA),
35118 #[doc = "Barometer readings for 2nd barometer."]
35119 #[doc = ""]
35120 #[doc = "ID: 137"]
35121 SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
35122 #[doc = "Barometer readings for 3rd barometer."]
35123 #[doc = ""]
35124 #[doc = "ID: 143"]
35125 SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
35126 #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
35127 #[doc = ""]
35128 #[doc = "ID: 126"]
35129 SERIAL_CONTROL(SERIAL_CONTROL_DATA),
35130 #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
35131 #[doc = ""]
35132 #[doc = "ID: 36"]
35133 SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
35134 #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
35135 #[doc = ""]
35136 #[doc = "ID: 256"]
35137 SETUP_SIGNING(SETUP_SIGNING_DATA),
35138 #[doc = "Set the vehicle attitude and body angular rates."]
35139 #[doc = ""]
35140 #[doc = "ID: 139"]
35141 SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
35142 #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
35143 #[doc = ""]
35144 #[doc = "ID: 82"]
35145 SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
35146 #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
35147 #[doc = ""]
35148 #[doc = "ID: 48"]
35149 #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
35150 SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
35151 #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on. The position is set automatically by the system during the takeoff (and may also be set using this message). The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
35152 #[doc = ""]
35153 #[doc = "ID: 243"]
35154 #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
35155 SET_HOME_POSITION(SET_HOME_POSITION_DATA),
35156 #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
35157 #[doc = ""]
35158 #[doc = "ID: 11"]
35159 #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
35160 SET_MODE(SET_MODE_DATA),
35161 #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
35162 #[doc = ""]
35163 #[doc = "ID: 86"]
35164 SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
35165 #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
35166 #[doc = ""]
35167 #[doc = "ID: 84"]
35168 SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
35169 #[doc = "Status of simulation environment, if used."]
35170 #[doc = ""]
35171 #[doc = "ID: 108"]
35172 SIM_STATE(SIM_STATE_DATA),
35173 #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
35174 #[doc = ""]
35175 #[doc = "ID: 370"]
35176 #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
35177 SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
35178 #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
35179 #[doc = ""]
35180 #[doc = "ID: 253"]
35181 STATUSTEXT(STATUSTEXT_DATA),
35182 #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
35183 #[doc = ""]
35184 #[doc = "ID: 261"]
35185 STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
35186 #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
35187 #[doc = ""]
35188 #[doc = "ID: 401"]
35189 SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
35190 #[doc = "The system time is the time of the master clock. This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network. Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time. This allows more broadly accurate date stamping of logs, and so on. If precise time synchronization is needed then use TIMESYNC instead."]
35191 #[doc = ""]
35192 #[doc = "ID: 2"]
35193 SYSTEM_TIME(SYSTEM_TIME_DATA),
35194 #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
35195 #[doc = ""]
35196 #[doc = "ID: 1"]
35197 SYS_STATUS(SYS_STATUS_DATA),
35198 #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
35199 #[doc = ""]
35200 #[doc = "ID: 135"]
35201 TERRAIN_CHECK(TERRAIN_CHECK_DATA),
35202 #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35203 #[doc = ""]
35204 #[doc = "ID: 134"]
35205 TERRAIN_DATA(TERRAIN_DATA_DATA),
35206 #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35207 #[doc = ""]
35208 #[doc = "ID: 136"]
35209 TERRAIN_REPORT(TERRAIN_REPORT_DATA),
35210 #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35211 #[doc = ""]
35212 #[doc = "ID: 133"]
35213 TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
35214 #[doc = "Time synchronization message. The message is used for both timesync requests and responses. The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component. The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request. Systems can determine if they are receiving a request or response based on the value of `tc`. If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error. Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used). The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset. See also: <https://mavlink.io/en/services/timesync.html>."]
35215 #[doc = ""]
35216 #[doc = "ID: 111"]
35217 TIMESYNC(TIMESYNC_DATA),
35218 #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
35219 #[doc = ""]
35220 #[doc = "ID: 380"]
35221 TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
35222 #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
35223 #[doc = ""]
35224 #[doc = "ID: 333"]
35225 TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
35226 #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
35227 #[doc = ""]
35228 #[doc = "ID: 332"]
35229 TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
35230 #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
35231 #[doc = ""]
35232 #[doc = "ID: 385"]
35233 TUNNEL(TUNNEL_DATA),
35234 #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
35235 #[doc = ""]
35236 #[doc = "ID: 311"]
35237 UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
35238 #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
35239 #[doc = ""]
35240 #[doc = "ID: 310"]
35241 UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
35242 #[doc = "The global position resulting from GPS and sensor fusion."]
35243 #[doc = ""]
35244 #[doc = "ID: 340"]
35245 UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
35246 #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
35247 #[doc = ""]
35248 #[doc = "ID: 248"]
35249 V2_EXTENSION(V2_EXTENSION_DATA),
35250 #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
35251 #[doc = ""]
35252 #[doc = "ID: 74"]
35253 VFR_HUD(VFR_HUD_DATA),
35254 #[doc = "Vibration levels and accelerometer clipping."]
35255 #[doc = ""]
35256 #[doc = "ID: 241"]
35257 VIBRATION(VIBRATION_DATA),
35258 #[doc = "Global position estimate from a Vicon motion system source."]
35259 #[doc = ""]
35260 #[doc = "ID: 104"]
35261 VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
35262 #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
35263 #[doc = ""]
35264 #[doc = "ID: 269"]
35265 VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
35266 #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
35267 #[doc = ""]
35268 #[doc = "ID: 270"]
35269 VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
35270 #[doc = "Local position/attitude estimate from a vision source."]
35271 #[doc = ""]
35272 #[doc = "ID: 102"]
35273 VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
35274 #[doc = "Speed estimate from a vision source."]
35275 #[doc = ""]
35276 #[doc = "ID: 103"]
35277 VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
35278 #[doc = "Cumulative distance traveled for each reported wheel."]
35279 #[doc = ""]
35280 #[doc = "ID: 9000"]
35281 WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
35282 #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35283 #[doc = ""]
35284 #[doc = "ID: 299"]
35285 WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
35286 #[doc = "Winch status."]
35287 #[doc = ""]
35288 #[doc = "ID: 9005"]
35289 WINCH_STATUS(WINCH_STATUS_DATA),
35290 #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
35291 #[doc = ""]
35292 #[doc = "ID: 231"]
35293 WIND_COV(WIND_COV_DATA),
35294}
35295impl MavMessage {
35296 pub const fn all_ids() -> &'static [u32] {
35297 &[
35298 0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
35299 24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
35300 36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
35301 48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
35302 67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
35303 84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
35304 103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
35305 114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
35306 125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
35307 136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
35308 148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
35309 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
35310 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
35311 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
35312 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
35313 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
35314 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
35315 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
35316 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
35317 440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
35318 12915u32, 12918u32, 12919u32, 12920u32, 50001u32, 50002u32, 50003u32, 50004u32,
35319 50005u32,
35320 ]
35321 }
35322 pub const fn all_messages() -> &'static [(&'static str, u32)] {
35323 &[
35324 (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
35325 (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
35326 (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
35327 (PING_DATA::NAME, PING_DATA::ID),
35328 (
35329 CHANGE_OPERATOR_CONTROL_DATA::NAME,
35330 CHANGE_OPERATOR_CONTROL_DATA::ID,
35331 ),
35332 (
35333 CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35334 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35335 ),
35336 (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
35337 (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
35338 (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
35339 (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
35340 (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
35341 (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
35342 (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
35343 (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
35344 (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
35345 (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
35346 (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
35347 (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
35348 (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
35349 (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
35350 (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
35351 (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
35352 (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
35353 (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
35354 (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
35355 (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
35356 (
35357 MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35358 MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35359 ),
35360 (
35361 MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35362 MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35363 ),
35364 (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
35365 (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
35366 (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
35367 (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
35368 (
35369 MISSION_REQUEST_LIST_DATA::NAME,
35370 MISSION_REQUEST_LIST_DATA::ID,
35371 ),
35372 (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
35373 (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
35374 (
35375 MISSION_ITEM_REACHED_DATA::NAME,
35376 MISSION_ITEM_REACHED_DATA::ID,
35377 ),
35378 (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
35379 (
35380 SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35381 SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35382 ),
35383 (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
35384 (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
35385 (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
35386 (
35387 SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35388 SAFETY_SET_ALLOWED_AREA_DATA::ID,
35389 ),
35390 (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
35391 (
35392 ATTITUDE_QUATERNION_COV_DATA::NAME,
35393 ATTITUDE_QUATERNION_COV_DATA::ID,
35394 ),
35395 (
35396 NAV_CONTROLLER_OUTPUT_DATA::NAME,
35397 NAV_CONTROLLER_OUTPUT_DATA::ID,
35398 ),
35399 (
35400 GLOBAL_POSITION_INT_COV_DATA::NAME,
35401 GLOBAL_POSITION_INT_COV_DATA::ID,
35402 ),
35403 (
35404 LOCAL_POSITION_NED_COV_DATA::NAME,
35405 LOCAL_POSITION_NED_COV_DATA::ID,
35406 ),
35407 (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
35408 (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
35409 (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
35410 (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
35411 (
35412 RC_CHANNELS_OVERRIDE_DATA::NAME,
35413 RC_CHANNELS_OVERRIDE_DATA::ID,
35414 ),
35415 (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
35416 (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
35417 (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
35418 (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
35419 (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
35420 (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
35421 (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
35422 (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
35423 (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
35424 (
35425 SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35426 SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35427 ),
35428 (
35429 POSITION_TARGET_LOCAL_NED_DATA::NAME,
35430 POSITION_TARGET_LOCAL_NED_DATA::ID,
35431 ),
35432 (
35433 SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35434 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35435 ),
35436 (
35437 POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35438 POSITION_TARGET_GLOBAL_INT_DATA::ID,
35439 ),
35440 (
35441 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
35442 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
35443 ),
35444 (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
35445 (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
35446 (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
35447 (
35448 HIL_ACTUATOR_CONTROLS_DATA::NAME,
35449 HIL_ACTUATOR_CONTROLS_DATA::ID,
35450 ),
35451 (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
35452 (
35453 GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35454 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35455 ),
35456 (
35457 VISION_POSITION_ESTIMATE_DATA::NAME,
35458 VISION_POSITION_ESTIMATE_DATA::ID,
35459 ),
35460 (
35461 VISION_SPEED_ESTIMATE_DATA::NAME,
35462 VISION_SPEED_ESTIMATE_DATA::ID,
35463 ),
35464 (
35465 VICON_POSITION_ESTIMATE_DATA::NAME,
35466 VICON_POSITION_ESTIMATE_DATA::ID,
35467 ),
35468 (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
35469 (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
35470 (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
35471 (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
35472 (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
35473 (
35474 FILE_TRANSFER_PROTOCOL_DATA::NAME,
35475 FILE_TRANSFER_PROTOCOL_DATA::ID,
35476 ),
35477 (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
35478 (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
35479 (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
35480 (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
35481 (
35482 HIL_STATE_QUATERNION_DATA::NAME,
35483 HIL_STATE_QUATERNION_DATA::ID,
35484 ),
35485 (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
35486 (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
35487 (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
35488 (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
35489 (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
35490 (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
35491 (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
35492 (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
35493 (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
35494 (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
35495 (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
35496 (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
35497 (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
35498 (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
35499 (
35500 DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35501 DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35502 ),
35503 (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
35504 (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
35505 (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
35506 (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
35507 (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
35508 (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
35509 (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
35510 (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
35511 (
35512 SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35513 SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35514 ),
35515 (
35516 ACTUATOR_CONTROL_TARGET_DATA::NAME,
35517 ACTUATOR_CONTROL_TARGET_DATA::ID,
35518 ),
35519 (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
35520 (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
35521 (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
35522 (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
35523 (
35524 CONTROL_SYSTEM_STATE_DATA::NAME,
35525 CONTROL_SYSTEM_STATE_DATA::ID,
35526 ),
35527 (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
35528 (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
35529 (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
35530 (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
35531 (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
35532 (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
35533 (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
35534 (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
35535 (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
35536 (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
35537 (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
35538 (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
35539 (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
35540 (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
35541 (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
35542 (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
35543 (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
35544 (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
35545 (COLLISION_DATA::NAME, COLLISION_DATA::ID),
35546 (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
35547 (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
35548 (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
35549 (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
35550 (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
35551 (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
35552 (DEBUG_DATA::NAME, DEBUG_DATA::ID),
35553 (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
35554 (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
35555 (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
35556 (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
35557 (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
35558 (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
35559 (
35560 CAMERA_CAPTURE_STATUS_DATA::NAME,
35561 CAMERA_CAPTURE_STATUS_DATA::ID,
35562 ),
35563 (
35564 CAMERA_IMAGE_CAPTURED_DATA::NAME,
35565 CAMERA_IMAGE_CAPTURED_DATA::ID,
35566 ),
35567 (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
35568 (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
35569 (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
35570 (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
35571 (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
35572 (
35573 VIDEO_STREAM_INFORMATION_DATA::NAME,
35574 VIDEO_STREAM_INFORMATION_DATA::ID,
35575 ),
35576 (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
35577 (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
35578 (
35579 CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35580 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35581 ),
35582 (
35583 CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35584 CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35585 ),
35586 (
35587 CAMERA_THERMAL_RANGE_DATA::NAME,
35588 CAMERA_THERMAL_RANGE_DATA::ID,
35589 ),
35590 (
35591 GIMBAL_MANAGER_INFORMATION_DATA::NAME,
35592 GIMBAL_MANAGER_INFORMATION_DATA::ID,
35593 ),
35594 (
35595 GIMBAL_MANAGER_STATUS_DATA::NAME,
35596 GIMBAL_MANAGER_STATUS_DATA::ID,
35597 ),
35598 (
35599 GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
35600 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35601 ),
35602 (
35603 GIMBAL_DEVICE_INFORMATION_DATA::NAME,
35604 GIMBAL_DEVICE_INFORMATION_DATA::ID,
35605 ),
35606 (
35607 GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
35608 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35609 ),
35610 (
35611 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
35612 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35613 ),
35614 (
35615 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
35616 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
35617 ),
35618 (
35619 GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
35620 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35621 ),
35622 (
35623 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
35624 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
35625 ),
35626 (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
35627 (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
35628 (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
35629 (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
35630 (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
35631 (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
35632 (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
35633 (
35634 PARAM_EXT_REQUEST_READ_DATA::NAME,
35635 PARAM_EXT_REQUEST_READ_DATA::ID,
35636 ),
35637 (
35638 PARAM_EXT_REQUEST_LIST_DATA::NAME,
35639 PARAM_EXT_REQUEST_LIST_DATA::ID,
35640 ),
35641 (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
35642 (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
35643 (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
35644 (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
35645 (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
35646 (
35647 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
35648 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
35649 ),
35650 (
35651 TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
35652 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35653 ),
35654 (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
35655 (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
35656 (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
35657 (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
35658 (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
35659 (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
35660 (
35661 ORBIT_EXECUTION_STATUS_DATA::NAME,
35662 ORBIT_EXECUTION_STATUS_DATA::ID,
35663 ),
35664 (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
35665 (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
35666 (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
35667 (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
35668 (
35669 ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35670 ACTUATOR_OUTPUT_STATUS_DATA::ID,
35671 ),
35672 (
35673 TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35674 TIME_ESTIMATE_TO_TARGET_DATA::ID,
35675 ),
35676 (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
35677 (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
35678 (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
35679 (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
35680 (
35681 ONBOARD_COMPUTER_STATUS_DATA::NAME,
35682 ONBOARD_COMPUTER_STATUS_DATA::ID,
35683 ),
35684 (
35685 COMPONENT_INFORMATION_DATA::NAME,
35686 COMPONENT_INFORMATION_DATA::ID,
35687 ),
35688 (
35689 COMPONENT_INFORMATION_BASIC_DATA::NAME,
35690 COMPONENT_INFORMATION_BASIC_DATA::ID,
35691 ),
35692 (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
35693 (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
35694 (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
35695 (EVENT_DATA::NAME, EVENT_DATA::ID),
35696 (
35697 CURRENT_EVENT_SEQUENCE_DATA::NAME,
35698 CURRENT_EVENT_SEQUENCE_DATA::ID,
35699 ),
35700 (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
35701 (
35702 RESPONSE_EVENT_ERROR_DATA::NAME,
35703 RESPONSE_EVENT_ERROR_DATA::ID,
35704 ),
35705 (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
35706 (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
35707 (
35708 AVAILABLE_MODES_MONITOR_DATA::NAME,
35709 AVAILABLE_MODES_MONITOR_DATA::ID,
35710 ),
35711 (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
35712 (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
35713 (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
35714 (
35715 OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35716 OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35717 ),
35718 (
35719 OPEN_DRONE_ID_LOCATION_DATA::NAME,
35720 OPEN_DRONE_ID_LOCATION_DATA::ID,
35721 ),
35722 (
35723 OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35724 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35725 ),
35726 (
35727 OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35728 OPEN_DRONE_ID_SELF_ID_DATA::ID,
35729 ),
35730 (
35731 OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35732 OPEN_DRONE_ID_SYSTEM_DATA::ID,
35733 ),
35734 (
35735 OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35736 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35737 ),
35738 (
35739 OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35740 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35741 ),
35742 (
35743 OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35744 OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35745 ),
35746 (
35747 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35748 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35749 ),
35750 (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
35751 (CUBEPILOT_RAW_RC_DATA::NAME, CUBEPILOT_RAW_RC_DATA::ID),
35752 (
35753 HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME,
35754 HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID,
35755 ),
35756 (HERELINK_TELEM_DATA::NAME, HERELINK_TELEM_DATA::ID),
35757 (
35758 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
35759 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
35760 ),
35761 (
35762 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
35763 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
35764 ),
35765 ]
35766 }
35767}
35768impl Message for MavMessage {
35769 fn parse(
35770 version: MavlinkVersion,
35771 id: u32,
35772 payload: &[u8],
35773 ) -> Result<Self, ::mavlink_core::error::ParserError> {
35774 match id {
35775 ACTUATOR_CONTROL_TARGET_DATA::ID => {
35776 ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35777 .map(Self::ACTUATOR_CONTROL_TARGET)
35778 }
35779 ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
35780 .map(Self::ACTUATOR_OUTPUT_STATUS),
35781 ADSB_VEHICLE_DATA::ID => {
35782 ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
35783 }
35784 AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
35785 ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
35786 ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
35787 ATTITUDE_QUATERNION_DATA::ID => {
35788 ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
35789 }
35790 ATTITUDE_QUATERNION_COV_DATA::ID => {
35791 ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
35792 .map(Self::ATTITUDE_QUATERNION_COV)
35793 }
35794 ATTITUDE_TARGET_DATA::ID => {
35795 ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
35796 }
35797 ATT_POS_MOCAP_DATA::ID => {
35798 ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
35799 }
35800 AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
35801 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35802 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
35803 .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
35804 }
35805 AUTOPILOT_VERSION_DATA::ID => {
35806 AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
35807 }
35808 AVAILABLE_MODES_DATA::ID => {
35809 AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
35810 }
35811 AVAILABLE_MODES_MONITOR_DATA::ID => {
35812 AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
35813 .map(Self::AVAILABLE_MODES_MONITOR)
35814 }
35815 BATTERY_INFO_DATA::ID => {
35816 BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
35817 }
35818 BATTERY_STATUS_DATA::ID => {
35819 BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
35820 }
35821 BUTTON_CHANGE_DATA::ID => {
35822 BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
35823 }
35824 CAMERA_CAPTURE_STATUS_DATA::ID => {
35825 CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
35826 }
35827 CAMERA_FOV_STATUS_DATA::ID => {
35828 CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
35829 }
35830 CAMERA_IMAGE_CAPTURED_DATA::ID => {
35831 CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
35832 }
35833 CAMERA_INFORMATION_DATA::ID => {
35834 CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
35835 }
35836 CAMERA_SETTINGS_DATA::ID => {
35837 CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
35838 }
35839 CAMERA_THERMAL_RANGE_DATA::ID => {
35840 CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
35841 }
35842 CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
35843 CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
35844 .map(Self::CAMERA_TRACKING_GEO_STATUS)
35845 }
35846 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
35847 CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
35848 .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
35849 }
35850 CAMERA_TRIGGER_DATA::ID => {
35851 CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
35852 }
35853 CANFD_FRAME_DATA::ID => {
35854 CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
35855 }
35856 CAN_FILTER_MODIFY_DATA::ID => {
35857 CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
35858 }
35859 CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
35860 CELLULAR_CONFIG_DATA::ID => {
35861 CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
35862 }
35863 CELLULAR_STATUS_DATA::ID => {
35864 CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
35865 }
35866 CHANGE_OPERATOR_CONTROL_DATA::ID => {
35867 CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
35868 .map(Self::CHANGE_OPERATOR_CONTROL)
35869 }
35870 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
35871 CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
35872 .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
35873 }
35874 COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
35875 COMMAND_ACK_DATA::ID => {
35876 COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
35877 }
35878 COMMAND_CANCEL_DATA::ID => {
35879 COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
35880 }
35881 COMMAND_INT_DATA::ID => {
35882 COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
35883 }
35884 COMMAND_LONG_DATA::ID => {
35885 COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
35886 }
35887 COMPONENT_INFORMATION_DATA::ID => {
35888 COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
35889 }
35890 COMPONENT_INFORMATION_BASIC_DATA::ID => {
35891 COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
35892 .map(Self::COMPONENT_INFORMATION_BASIC)
35893 }
35894 COMPONENT_METADATA_DATA::ID => {
35895 COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
35896 }
35897 CONTROL_SYSTEM_STATE_DATA::ID => {
35898 CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
35899 }
35900 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
35901 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::deser(version, payload)
35902 .map(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP)
35903 }
35904 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
35905 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::deser(version, payload)
35906 .map(Self::CUBEPILOT_FIRMWARE_UPDATE_START)
35907 }
35908 CUBEPILOT_RAW_RC_DATA::ID => {
35909 CUBEPILOT_RAW_RC_DATA::deser(version, payload).map(Self::CUBEPILOT_RAW_RC)
35910 }
35911 CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
35912 .map(Self::CURRENT_EVENT_SEQUENCE),
35913 CURRENT_MODE_DATA::ID => {
35914 CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
35915 }
35916 DATA_STREAM_DATA::ID => {
35917 DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
35918 }
35919 DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
35920 DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
35921 .map(Self::DATA_TRANSMISSION_HANDSHAKE)
35922 }
35923 DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
35924 DEBUG_FLOAT_ARRAY_DATA::ID => {
35925 DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
35926 }
35927 DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
35928 DISTANCE_SENSOR_DATA::ID => {
35929 DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
35930 }
35931 EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
35932 ENCAPSULATED_DATA_DATA::ID => {
35933 ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
35934 }
35935 ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
35936 ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
35937 ESTIMATOR_STATUS_DATA::ID => {
35938 ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
35939 }
35940 EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
35941 EXTENDED_SYS_STATE_DATA::ID => {
35942 EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
35943 }
35944 FENCE_STATUS_DATA::ID => {
35945 FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
35946 }
35947 FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
35948 .map(Self::FILE_TRANSFER_PROTOCOL),
35949 FLIGHT_INFORMATION_DATA::ID => {
35950 FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
35951 }
35952 FOLLOW_TARGET_DATA::ID => {
35953 FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
35954 }
35955 FUEL_STATUS_DATA::ID => {
35956 FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
35957 }
35958 GENERATOR_STATUS_DATA::ID => {
35959 GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
35960 }
35961 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
35962 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
35963 .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
35964 }
35965 GIMBAL_DEVICE_INFORMATION_DATA::ID => {
35966 GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
35967 .map(Self::GIMBAL_DEVICE_INFORMATION)
35968 }
35969 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
35970 GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
35971 .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
35972 }
35973 GIMBAL_MANAGER_INFORMATION_DATA::ID => {
35974 GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
35975 .map(Self::GIMBAL_MANAGER_INFORMATION)
35976 }
35977 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
35978 GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
35979 .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
35980 }
35981 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35982 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
35983 .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
35984 }
35985 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
35986 GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
35987 .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
35988 }
35989 GIMBAL_MANAGER_STATUS_DATA::ID => {
35990 GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
35991 }
35992 GLOBAL_POSITION_INT_DATA::ID => {
35993 GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
35994 }
35995 GLOBAL_POSITION_INT_COV_DATA::ID => {
35996 GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
35997 .map(Self::GLOBAL_POSITION_INT_COV)
35998 }
35999 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36000 GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
36001 .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
36002 }
36003 GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
36004 GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
36005 GPS_GLOBAL_ORIGIN_DATA::ID => {
36006 GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
36007 }
36008 GPS_INJECT_DATA_DATA::ID => {
36009 GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
36010 }
36011 GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
36012 GPS_RAW_INT_DATA::ID => {
36013 GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
36014 }
36015 GPS_RTCM_DATA_DATA::ID => {
36016 GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
36017 }
36018 GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
36019 GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
36020 HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
36021 HERELINK_TELEM_DATA::ID => {
36022 HERELINK_TELEM_DATA::deser(version, payload).map(Self::HERELINK_TELEM)
36023 }
36024 HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
36025 HERELINK_VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
36026 .map(Self::HERELINK_VIDEO_STREAM_INFORMATION)
36027 }
36028 HIGHRES_IMU_DATA::ID => {
36029 HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
36030 }
36031 HIGH_LATENCY_DATA::ID => {
36032 HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
36033 }
36034 HIGH_LATENCY2_DATA::ID => {
36035 HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
36036 }
36037 HIL_ACTUATOR_CONTROLS_DATA::ID => {
36038 HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
36039 }
36040 HIL_CONTROLS_DATA::ID => {
36041 HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
36042 }
36043 HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
36044 HIL_OPTICAL_FLOW_DATA::ID => {
36045 HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
36046 }
36047 HIL_RC_INPUTS_RAW_DATA::ID => {
36048 HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
36049 }
36050 HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
36051 HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
36052 HIL_STATE_QUATERNION_DATA::ID => {
36053 HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
36054 }
36055 HOME_POSITION_DATA::ID => {
36056 HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
36057 }
36058 HYGROMETER_SENSOR_DATA::ID => {
36059 HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
36060 }
36061 ILLUMINATOR_STATUS_DATA::ID => {
36062 ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
36063 }
36064 ISBD_LINK_STATUS_DATA::ID => {
36065 ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
36066 }
36067 LANDING_TARGET_DATA::ID => {
36068 LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
36069 }
36070 LINK_NODE_STATUS_DATA::ID => {
36071 LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
36072 }
36073 LOCAL_POSITION_NED_DATA::ID => {
36074 LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
36075 }
36076 LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
36077 .map(Self::LOCAL_POSITION_NED_COV),
36078 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36079 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
36080 .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
36081 }
36082 LOGGING_ACK_DATA::ID => {
36083 LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
36084 }
36085 LOGGING_DATA_DATA::ID => {
36086 LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
36087 }
36088 LOGGING_DATA_ACKED_DATA::ID => {
36089 LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
36090 }
36091 LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
36092 LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
36093 LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
36094 LOG_REQUEST_DATA_DATA::ID => {
36095 LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
36096 }
36097 LOG_REQUEST_END_DATA::ID => {
36098 LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
36099 }
36100 LOG_REQUEST_LIST_DATA::ID => {
36101 LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
36102 }
36103 MAG_CAL_REPORT_DATA::ID => {
36104 MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
36105 }
36106 MANUAL_CONTROL_DATA::ID => {
36107 MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
36108 }
36109 MANUAL_SETPOINT_DATA::ID => {
36110 MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
36111 }
36112 MEMORY_VECT_DATA::ID => {
36113 MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
36114 }
36115 MESSAGE_INTERVAL_DATA::ID => {
36116 MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
36117 }
36118 MISSION_ACK_DATA::ID => {
36119 MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
36120 }
36121 MISSION_CLEAR_ALL_DATA::ID => {
36122 MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
36123 }
36124 MISSION_COUNT_DATA::ID => {
36125 MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
36126 }
36127 MISSION_CURRENT_DATA::ID => {
36128 MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
36129 }
36130 MISSION_ITEM_DATA::ID => {
36131 MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
36132 }
36133 MISSION_ITEM_INT_DATA::ID => {
36134 MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
36135 }
36136 MISSION_ITEM_REACHED_DATA::ID => {
36137 MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
36138 }
36139 MISSION_REQUEST_DATA::ID => {
36140 MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
36141 }
36142 MISSION_REQUEST_INT_DATA::ID => {
36143 MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
36144 }
36145 MISSION_REQUEST_LIST_DATA::ID => {
36146 MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
36147 }
36148 MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
36149 MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
36150 .map(Self::MISSION_REQUEST_PARTIAL_LIST)
36151 }
36152 MISSION_SET_CURRENT_DATA::ID => {
36153 MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
36154 }
36155 MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
36156 MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
36157 .map(Self::MISSION_WRITE_PARTIAL_LIST)
36158 }
36159 MOUNT_ORIENTATION_DATA::ID => {
36160 MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
36161 }
36162 NAMED_VALUE_FLOAT_DATA::ID => {
36163 NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
36164 }
36165 NAMED_VALUE_INT_DATA::ID => {
36166 NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
36167 }
36168 NAV_CONTROLLER_OUTPUT_DATA::ID => {
36169 NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
36170 }
36171 OBSTACLE_DISTANCE_DATA::ID => {
36172 OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
36173 }
36174 ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
36175 ONBOARD_COMPUTER_STATUS_DATA::ID => {
36176 ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
36177 .map(Self::ONBOARD_COMPUTER_STATUS)
36178 }
36179 OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
36180 OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
36181 .map(Self::OPEN_DRONE_ID_ARM_STATUS)
36182 }
36183 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
36184 OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
36185 .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
36186 }
36187 OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
36188 .map(Self::OPEN_DRONE_ID_BASIC_ID),
36189 OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
36190 .map(Self::OPEN_DRONE_ID_LOCATION),
36191 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
36192 OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
36193 .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
36194 }
36195 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
36196 OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
36197 .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
36198 }
36199 OPEN_DRONE_ID_SELF_ID_DATA::ID => {
36200 OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
36201 }
36202 OPEN_DRONE_ID_SYSTEM_DATA::ID => {
36203 OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
36204 }
36205 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
36206 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
36207 .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
36208 }
36209 OPTICAL_FLOW_DATA::ID => {
36210 OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
36211 }
36212 OPTICAL_FLOW_RAD_DATA::ID => {
36213 OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
36214 }
36215 ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
36216 .map(Self::ORBIT_EXECUTION_STATUS),
36217 PARAM_EXT_ACK_DATA::ID => {
36218 PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
36219 }
36220 PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
36221 .map(Self::PARAM_EXT_REQUEST_LIST),
36222 PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
36223 .map(Self::PARAM_EXT_REQUEST_READ),
36224 PARAM_EXT_SET_DATA::ID => {
36225 PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
36226 }
36227 PARAM_EXT_VALUE_DATA::ID => {
36228 PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
36229 }
36230 PARAM_MAP_RC_DATA::ID => {
36231 PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
36232 }
36233 PARAM_REQUEST_LIST_DATA::ID => {
36234 PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
36235 }
36236 PARAM_REQUEST_READ_DATA::ID => {
36237 PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
36238 }
36239 PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
36240 PARAM_VALUE_DATA::ID => {
36241 PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
36242 }
36243 PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
36244 PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
36245 PLAY_TUNE_V2_DATA::ID => {
36246 PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
36247 }
36248 POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36249 POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
36250 .map(Self::POSITION_TARGET_GLOBAL_INT)
36251 }
36252 POSITION_TARGET_LOCAL_NED_DATA::ID => {
36253 POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
36254 .map(Self::POSITION_TARGET_LOCAL_NED)
36255 }
36256 POWER_STATUS_DATA::ID => {
36257 POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
36258 }
36259 PROTOCOL_VERSION_DATA::ID => {
36260 PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
36261 }
36262 RADIO_STATUS_DATA::ID => {
36263 RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
36264 }
36265 RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
36266 RAW_PRESSURE_DATA::ID => {
36267 RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
36268 }
36269 RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
36270 RC_CHANNELS_DATA::ID => {
36271 RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
36272 }
36273 RC_CHANNELS_OVERRIDE_DATA::ID => {
36274 RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
36275 }
36276 RC_CHANNELS_RAW_DATA::ID => {
36277 RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
36278 }
36279 RC_CHANNELS_SCALED_DATA::ID => {
36280 RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
36281 }
36282 REQUEST_DATA_STREAM_DATA::ID => {
36283 REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
36284 }
36285 REQUEST_EVENT_DATA::ID => {
36286 REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
36287 }
36288 RESOURCE_REQUEST_DATA::ID => {
36289 RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
36290 }
36291 RESPONSE_EVENT_ERROR_DATA::ID => {
36292 RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
36293 }
36294 SAFETY_ALLOWED_AREA_DATA::ID => {
36295 SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
36296 }
36297 SAFETY_SET_ALLOWED_AREA_DATA::ID => {
36298 SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
36299 .map(Self::SAFETY_SET_ALLOWED_AREA)
36300 }
36301 SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
36302 SCALED_IMU2_DATA::ID => {
36303 SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
36304 }
36305 SCALED_IMU3_DATA::ID => {
36306 SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
36307 }
36308 SCALED_PRESSURE_DATA::ID => {
36309 SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
36310 }
36311 SCALED_PRESSURE2_DATA::ID => {
36312 SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
36313 }
36314 SCALED_PRESSURE3_DATA::ID => {
36315 SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
36316 }
36317 SERIAL_CONTROL_DATA::ID => {
36318 SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
36319 }
36320 SERVO_OUTPUT_RAW_DATA::ID => {
36321 SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
36322 }
36323 SETUP_SIGNING_DATA::ID => {
36324 SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
36325 }
36326 SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
36327 SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
36328 .map(Self::SET_ACTUATOR_CONTROL_TARGET)
36329 }
36330 SET_ATTITUDE_TARGET_DATA::ID => {
36331 SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
36332 }
36333 SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
36334 SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
36335 }
36336 SET_HOME_POSITION_DATA::ID => {
36337 SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
36338 }
36339 SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
36340 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36341 SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
36342 .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
36343 }
36344 SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
36345 SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
36346 .map(Self::SET_POSITION_TARGET_LOCAL_NED)
36347 }
36348 SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
36349 SMART_BATTERY_INFO_DATA::ID => {
36350 SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
36351 }
36352 STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
36353 STORAGE_INFORMATION_DATA::ID => {
36354 STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
36355 }
36356 SUPPORTED_TUNES_DATA::ID => {
36357 SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
36358 }
36359 SYSTEM_TIME_DATA::ID => {
36360 SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
36361 }
36362 SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
36363 TERRAIN_CHECK_DATA::ID => {
36364 TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
36365 }
36366 TERRAIN_DATA_DATA::ID => {
36367 TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
36368 }
36369 TERRAIN_REPORT_DATA::ID => {
36370 TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
36371 }
36372 TERRAIN_REQUEST_DATA::ID => {
36373 TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
36374 }
36375 TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
36376 TIME_ESTIMATE_TO_TARGET_DATA::ID => {
36377 TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
36378 .map(Self::TIME_ESTIMATE_TO_TARGET)
36379 }
36380 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36381 TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
36382 .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
36383 }
36384 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36385 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
36386 .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
36387 }
36388 TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
36389 UAVCAN_NODE_INFO_DATA::ID => {
36390 UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
36391 }
36392 UAVCAN_NODE_STATUS_DATA::ID => {
36393 UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
36394 }
36395 UTM_GLOBAL_POSITION_DATA::ID => {
36396 UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
36397 }
36398 V2_EXTENSION_DATA::ID => {
36399 V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
36400 }
36401 VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
36402 VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
36403 VICON_POSITION_ESTIMATE_DATA::ID => {
36404 VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
36405 .map(Self::VICON_POSITION_ESTIMATE)
36406 }
36407 VIDEO_STREAM_INFORMATION_DATA::ID => {
36408 VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
36409 .map(Self::VIDEO_STREAM_INFORMATION)
36410 }
36411 VIDEO_STREAM_STATUS_DATA::ID => {
36412 VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
36413 }
36414 VISION_POSITION_ESTIMATE_DATA::ID => {
36415 VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
36416 .map(Self::VISION_POSITION_ESTIMATE)
36417 }
36418 VISION_SPEED_ESTIMATE_DATA::ID => {
36419 VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
36420 }
36421 WHEEL_DISTANCE_DATA::ID => {
36422 WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
36423 }
36424 WIFI_CONFIG_AP_DATA::ID => {
36425 WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
36426 }
36427 WINCH_STATUS_DATA::ID => {
36428 WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
36429 }
36430 WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
36431 _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
36432 }
36433 }
36434 fn message_name(&self) -> &'static str {
36435 match self {
36436 Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
36437 Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
36438 Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
36439 Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
36440 Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
36441 Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
36442 Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
36443 Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
36444 Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
36445 Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
36446 Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
36447 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36448 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
36449 }
36450 Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
36451 Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
36452 Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
36453 Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
36454 Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
36455 Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
36456 Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
36457 Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
36458 Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
36459 Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
36460 Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
36461 Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
36462 Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
36463 Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
36464 Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
36465 Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
36466 Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
36467 Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
36468 Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
36469 Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
36470 Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
36471 Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
36472 Self::COLLISION(..) => COLLISION_DATA::NAME,
36473 Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
36474 Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
36475 Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
36476 Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
36477 Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
36478 Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
36479 Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
36480 Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
36481 Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
36482 Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
36483 Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::NAME,
36484 Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
36485 Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
36486 Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
36487 Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
36488 Self::DEBUG(..) => DEBUG_DATA::NAME,
36489 Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
36490 Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
36491 Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
36492 Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
36493 Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
36494 Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
36495 Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
36496 Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
36497 Self::EVENT(..) => EVENT_DATA::NAME,
36498 Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
36499 Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
36500 Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
36501 Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
36502 Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
36503 Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
36504 Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
36505 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36506 Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36507 Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36508 Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36509 Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36510 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36511 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
36512 }
36513 Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36514 Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
36515 Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
36516 Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
36517 Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
36518 Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
36519 Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
36520 Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
36521 Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
36522 Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
36523 Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
36524 Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
36525 Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
36526 Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
36527 Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
36528 Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::NAME,
36529 Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
36530 HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME
36531 }
36532 Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
36533 Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
36534 Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
36535 Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
36536 Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
36537 Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
36538 Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
36539 Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
36540 Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
36541 Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
36542 Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
36543 Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
36544 Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
36545 Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
36546 Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
36547 Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
36548 Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
36549 Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
36550 Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
36551 Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36552 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
36553 }
36554 Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
36555 Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
36556 Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
36557 Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
36558 Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
36559 Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
36560 Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
36561 Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
36562 Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
36563 Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
36564 Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
36565 Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
36566 Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
36567 Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
36568 Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
36569 Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
36570 Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
36571 Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
36572 Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
36573 Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
36574 Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
36575 Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
36576 Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
36577 Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
36578 Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
36579 Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
36580 Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
36581 Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
36582 Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
36583 Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
36584 Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
36585 Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
36586 Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
36587 Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
36588 Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
36589 Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
36590 Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
36591 Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
36592 Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
36593 Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
36594 Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
36595 Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
36596 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
36597 Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
36598 Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
36599 Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
36600 Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
36601 Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
36602 Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
36603 Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
36604 Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
36605 Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
36606 Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
36607 Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
36608 Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
36609 Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
36610 Self::PING(..) => PING_DATA::NAME,
36611 Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
36612 Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
36613 Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36614 Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
36615 Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
36616 Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
36617 Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
36618 Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
36619 Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
36620 Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
36621 Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
36622 Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
36623 Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
36624 Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
36625 Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
36626 Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
36627 Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
36628 Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
36629 Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
36630 Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
36631 Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
36632 Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
36633 Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
36634 Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
36635 Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
36636 Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
36637 Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
36638 Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
36639 Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
36640 Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
36641 Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
36642 Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
36643 Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
36644 Self::SET_MODE(..) => SET_MODE_DATA::NAME,
36645 Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36646 Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
36647 Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
36648 Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
36649 Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
36650 Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
36651 Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
36652 Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
36653 Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
36654 Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
36655 Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
36656 Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
36657 Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
36658 Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
36659 Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
36660 Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
36661 TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
36662 }
36663 Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36664 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
36665 }
36666 Self::TUNNEL(..) => TUNNEL_DATA::NAME,
36667 Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
36668 Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
36669 Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
36670 Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
36671 Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
36672 Self::VIBRATION(..) => VIBRATION_DATA::NAME,
36673 Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
36674 Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
36675 Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
36676 Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
36677 Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
36678 Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
36679 Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
36680 Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
36681 Self::WIND_COV(..) => WIND_COV_DATA::NAME,
36682 }
36683 }
36684 fn message_id(&self) -> u32 {
36685 match self {
36686 Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
36687 Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
36688 Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
36689 Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
36690 Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
36691 Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
36692 Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
36693 Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
36694 Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
36695 Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
36696 Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
36697 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36698 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
36699 }
36700 Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
36701 Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
36702 Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
36703 Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
36704 Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
36705 Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
36706 Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
36707 Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
36708 Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
36709 Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
36710 Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
36711 Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
36712 Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
36713 Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
36714 Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
36715 Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
36716 Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
36717 Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
36718 Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
36719 Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
36720 Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
36721 Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
36722 Self::COLLISION(..) => COLLISION_DATA::ID,
36723 Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
36724 Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
36725 Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
36726 Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
36727 Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
36728 Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
36729 Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
36730 Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
36731 Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
36732 Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
36733 Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::ID,
36734 Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
36735 Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
36736 Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
36737 Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
36738 Self::DEBUG(..) => DEBUG_DATA::ID,
36739 Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
36740 Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
36741 Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
36742 Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
36743 Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
36744 Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
36745 Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
36746 Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
36747 Self::EVENT(..) => EVENT_DATA::ID,
36748 Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
36749 Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
36750 Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
36751 Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
36752 Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
36753 Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
36754 Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
36755 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36756 Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
36757 Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36758 Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
36759 Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36760 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36761 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
36762 }
36763 Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36764 Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
36765 Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
36766 Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
36767 Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
36768 Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
36769 Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
36770 Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
36771 Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
36772 Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
36773 Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
36774 Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
36775 Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
36776 Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
36777 Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
36778 Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::ID,
36779 Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
36780 HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID
36781 }
36782 Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
36783 Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
36784 Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
36785 Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
36786 Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
36787 Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
36788 Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
36789 Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
36790 Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
36791 Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
36792 Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
36793 Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
36794 Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
36795 Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
36796 Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
36797 Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
36798 Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
36799 Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
36800 Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
36801 Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36802 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
36803 }
36804 Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
36805 Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
36806 Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
36807 Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
36808 Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
36809 Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
36810 Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
36811 Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
36812 Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
36813 Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
36814 Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
36815 Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
36816 Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
36817 Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
36818 Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
36819 Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
36820 Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
36821 Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
36822 Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
36823 Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
36824 Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
36825 Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
36826 Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
36827 Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
36828 Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
36829 Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
36830 Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
36831 Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
36832 Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
36833 Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
36834 Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
36835 Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
36836 Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
36837 Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
36838 Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36839 Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36840 Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36841 Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
36842 Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36843 Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36844 Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
36845 Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
36846 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36847 Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
36848 Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
36849 Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
36850 Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
36851 Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
36852 Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
36853 Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
36854 Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
36855 Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
36856 Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
36857 Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
36858 Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
36859 Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
36860 Self::PING(..) => PING_DATA::ID,
36861 Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
36862 Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
36863 Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
36864 Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
36865 Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
36866 Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
36867 Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
36868 Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
36869 Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
36870 Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
36871 Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
36872 Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
36873 Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
36874 Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
36875 Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
36876 Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
36877 Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
36878 Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
36879 Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
36880 Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
36881 Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
36882 Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
36883 Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
36884 Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
36885 Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
36886 Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
36887 Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
36888 Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
36889 Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
36890 Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
36891 Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
36892 Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
36893 Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
36894 Self::SET_MODE(..) => SET_MODE_DATA::ID,
36895 Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
36896 Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
36897 Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
36898 Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
36899 Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
36900 Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
36901 Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
36902 Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
36903 Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
36904 Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
36905 Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
36906 Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
36907 Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
36908 Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
36909 Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
36910 Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36911 Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36912 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
36913 }
36914 Self::TUNNEL(..) => TUNNEL_DATA::ID,
36915 Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
36916 Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
36917 Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
36918 Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
36919 Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
36920 Self::VIBRATION(..) => VIBRATION_DATA::ID,
36921 Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
36922 Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
36923 Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
36924 Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
36925 Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
36926 Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
36927 Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
36928 Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
36929 Self::WIND_COV(..) => WIND_COV_DATA::ID,
36930 }
36931 }
36932 fn message_id_from_name(name: &str) -> Option<u32> {
36933 match name {
36934 ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
36935 ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
36936 ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
36937 AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
36938 ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
36939 ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
36940 ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
36941 ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
36942 ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
36943 ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
36944 AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
36945 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
36946 Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
36947 }
36948 AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
36949 AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
36950 AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
36951 BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
36952 BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
36953 BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
36954 CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
36955 CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
36956 CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
36957 CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
36958 CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
36959 CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
36960 CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
36961 CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
36962 CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
36963 CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
36964 CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
36965 CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
36966 CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
36967 CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
36968 CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
36969 CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
36970 COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
36971 COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
36972 COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
36973 COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
36974 COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
36975 COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
36976 COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
36977 COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
36978 CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
36979 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME => {
36980 Some(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID)
36981 }
36982 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME => {
36983 Some(CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID)
36984 }
36985 CUBEPILOT_RAW_RC_DATA::NAME => Some(CUBEPILOT_RAW_RC_DATA::ID),
36986 CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
36987 CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
36988 DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
36989 DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
36990 DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
36991 DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
36992 DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
36993 DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
36994 EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
36995 ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
36996 ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
36997 ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
36998 ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
36999 EVENT_DATA::NAME => Some(EVENT_DATA::ID),
37000 EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
37001 FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
37002 FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
37003 FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
37004 FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
37005 FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
37006 GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
37007 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
37008 Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
37009 }
37010 GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
37011 GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
37012 GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
37013 GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
37014 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
37015 Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
37016 }
37017 GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
37018 GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
37019 GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
37020 GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
37021 GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
37022 Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
37023 }
37024 GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
37025 GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
37026 GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
37027 GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
37028 GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
37029 GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
37030 GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
37031 GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
37032 GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
37033 HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
37034 HERELINK_TELEM_DATA::NAME => Some(HERELINK_TELEM_DATA::ID),
37035 HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME => {
37036 Some(HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID)
37037 }
37038 HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
37039 HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
37040 HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
37041 HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
37042 HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
37043 HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
37044 HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
37045 HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
37046 HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
37047 HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
37048 HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
37049 HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
37050 HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
37051 ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
37052 ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
37053 LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
37054 LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
37055 LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
37056 LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
37057 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
37058 Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
37059 }
37060 LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
37061 LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
37062 LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
37063 LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
37064 LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
37065 LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
37066 LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
37067 LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
37068 LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
37069 MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
37070 MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
37071 MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
37072 MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
37073 MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
37074 MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
37075 MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
37076 MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
37077 MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
37078 MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
37079 MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
37080 MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
37081 MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
37082 MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
37083 MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
37084 MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
37085 MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
37086 MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
37087 MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
37088 NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
37089 NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
37090 NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
37091 OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
37092 ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
37093 ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
37094 OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
37095 OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
37096 OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
37097 OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
37098 OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
37099 OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
37100 OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
37101 OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
37102 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
37103 OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
37104 OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
37105 ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
37106 PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
37107 PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
37108 PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
37109 PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
37110 PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
37111 PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
37112 PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
37113 PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
37114 PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
37115 PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
37116 PING_DATA::NAME => Some(PING_DATA::ID),
37117 PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
37118 PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
37119 POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
37120 POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
37121 POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
37122 PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
37123 RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
37124 RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
37125 RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
37126 RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
37127 RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
37128 RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
37129 RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
37130 RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
37131 REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
37132 REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
37133 RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
37134 RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
37135 SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
37136 SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
37137 SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
37138 SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
37139 SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
37140 SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
37141 SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
37142 SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
37143 SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
37144 SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
37145 SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
37146 SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
37147 SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
37148 SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
37149 SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
37150 SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
37151 SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
37152 Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
37153 }
37154 SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
37155 Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
37156 }
37157 SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
37158 SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
37159 STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
37160 STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
37161 SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
37162 SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
37163 SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
37164 TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
37165 TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
37166 TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
37167 TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
37168 TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
37169 TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
37170 TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
37171 Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
37172 }
37173 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
37174 Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
37175 }
37176 TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
37177 UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
37178 UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
37179 UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
37180 V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
37181 VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
37182 VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
37183 VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
37184 VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
37185 VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
37186 VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
37187 VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
37188 WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
37189 WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
37190 WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
37191 WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
37192 _ => None,
37193 }
37194 }
37195 fn default_message_from_id(id: u32) -> Option<Self> {
37196 match id {
37197 ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37198 ACTUATOR_CONTROL_TARGET_DATA::default(),
37199 )),
37200 ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37201 ACTUATOR_OUTPUT_STATUS_DATA::default(),
37202 )),
37203 ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
37204 AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
37205 ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
37206 ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
37207 ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37208 ATTITUDE_QUATERNION_DATA::default(),
37209 )),
37210 ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37211 ATTITUDE_QUATERNION_COV_DATA::default(),
37212 )),
37213 ATTITUDE_TARGET_DATA::ID => {
37214 Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
37215 }
37216 ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
37217 AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
37218 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37219 Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37220 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
37221 ))
37222 }
37223 AUTOPILOT_VERSION_DATA::ID => {
37224 Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
37225 }
37226 AVAILABLE_MODES_DATA::ID => {
37227 Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
37228 }
37229 AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37230 AVAILABLE_MODES_MONITOR_DATA::default(),
37231 )),
37232 BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
37233 BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
37234 BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
37235 CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37236 CAMERA_CAPTURE_STATUS_DATA::default(),
37237 )),
37238 CAMERA_FOV_STATUS_DATA::ID => {
37239 Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
37240 }
37241 CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37242 CAMERA_IMAGE_CAPTURED_DATA::default(),
37243 )),
37244 CAMERA_INFORMATION_DATA::ID => {
37245 Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
37246 }
37247 CAMERA_SETTINGS_DATA::ID => {
37248 Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
37249 }
37250 CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37251 CAMERA_THERMAL_RANGE_DATA::default(),
37252 )),
37253 CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37254 CAMERA_TRACKING_GEO_STATUS_DATA::default(),
37255 )),
37256 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37257 CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
37258 )),
37259 CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
37260 CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
37261 CAN_FILTER_MODIFY_DATA::ID => {
37262 Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
37263 }
37264 CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
37265 CELLULAR_CONFIG_DATA::ID => {
37266 Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
37267 }
37268 CELLULAR_STATUS_DATA::ID => {
37269 Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
37270 }
37271 CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37272 CHANGE_OPERATOR_CONTROL_DATA::default(),
37273 )),
37274 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37275 CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
37276 )),
37277 COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
37278 COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
37279 COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
37280 COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
37281 COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
37282 COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37283 COMPONENT_INFORMATION_DATA::default(),
37284 )),
37285 COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37286 COMPONENT_INFORMATION_BASIC_DATA::default(),
37287 )),
37288 COMPONENT_METADATA_DATA::ID => {
37289 Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
37290 }
37291 CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37292 CONTROL_SYSTEM_STATE_DATA::default(),
37293 )),
37294 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
37295 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::default(),
37296 )),
37297 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
37298 Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
37299 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::default(),
37300 ))
37301 }
37302 CUBEPILOT_RAW_RC_DATA::ID => {
37303 Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::default()))
37304 }
37305 CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37306 CURRENT_EVENT_SEQUENCE_DATA::default(),
37307 )),
37308 CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
37309 DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
37310 DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37311 DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
37312 )),
37313 DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
37314 DEBUG_FLOAT_ARRAY_DATA::ID => {
37315 Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
37316 }
37317 DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
37318 DISTANCE_SENSOR_DATA::ID => {
37319 Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
37320 }
37321 EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
37322 ENCAPSULATED_DATA_DATA::ID => {
37323 Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
37324 }
37325 ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
37326 ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
37327 ESTIMATOR_STATUS_DATA::ID => {
37328 Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
37329 }
37330 EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
37331 EXTENDED_SYS_STATE_DATA::ID => {
37332 Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
37333 }
37334 FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
37335 FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37336 FILE_TRANSFER_PROTOCOL_DATA::default(),
37337 )),
37338 FLIGHT_INFORMATION_DATA::ID => {
37339 Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
37340 }
37341 FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
37342 FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
37343 GENERATOR_STATUS_DATA::ID => {
37344 Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
37345 }
37346 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37347 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
37348 )),
37349 GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37350 GIMBAL_DEVICE_INFORMATION_DATA::default(),
37351 )),
37352 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37353 GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
37354 )),
37355 GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37356 GIMBAL_MANAGER_INFORMATION_DATA::default(),
37357 )),
37358 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37359 GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
37360 )),
37361 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37362 Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37363 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
37364 ))
37365 }
37366 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37367 GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
37368 )),
37369 GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37370 GIMBAL_MANAGER_STATUS_DATA::default(),
37371 )),
37372 GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37373 GLOBAL_POSITION_INT_DATA::default(),
37374 )),
37375 GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37376 GLOBAL_POSITION_INT_COV_DATA::default(),
37377 )),
37378 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37379 Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37380 GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
37381 ))
37382 }
37383 GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
37384 GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
37385 GPS_GLOBAL_ORIGIN_DATA::ID => {
37386 Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
37387 }
37388 GPS_INJECT_DATA_DATA::ID => {
37389 Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
37390 }
37391 GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
37392 GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
37393 GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
37394 GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
37395 GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
37396 HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
37397 HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::default())),
37398 HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
37399 Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
37400 HERELINK_VIDEO_STREAM_INFORMATION_DATA::default(),
37401 ))
37402 }
37403 HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
37404 HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
37405 HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
37406 HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37407 HIL_ACTUATOR_CONTROLS_DATA::default(),
37408 )),
37409 HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
37410 HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
37411 HIL_OPTICAL_FLOW_DATA::ID => {
37412 Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
37413 }
37414 HIL_RC_INPUTS_RAW_DATA::ID => {
37415 Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
37416 }
37417 HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
37418 HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
37419 HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37420 HIL_STATE_QUATERNION_DATA::default(),
37421 )),
37422 HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
37423 HYGROMETER_SENSOR_DATA::ID => {
37424 Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
37425 }
37426 ILLUMINATOR_STATUS_DATA::ID => {
37427 Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
37428 }
37429 ISBD_LINK_STATUS_DATA::ID => {
37430 Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
37431 }
37432 LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
37433 LINK_NODE_STATUS_DATA::ID => {
37434 Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
37435 }
37436 LOCAL_POSITION_NED_DATA::ID => {
37437 Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
37438 }
37439 LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37440 LOCAL_POSITION_NED_COV_DATA::default(),
37441 )),
37442 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37443 Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37444 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
37445 ))
37446 }
37447 LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
37448 LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
37449 LOGGING_DATA_ACKED_DATA::ID => {
37450 Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
37451 }
37452 LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
37453 LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
37454 LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
37455 LOG_REQUEST_DATA_DATA::ID => {
37456 Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
37457 }
37458 LOG_REQUEST_END_DATA::ID => {
37459 Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
37460 }
37461 LOG_REQUEST_LIST_DATA::ID => {
37462 Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
37463 }
37464 MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
37465 MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
37466 MANUAL_SETPOINT_DATA::ID => {
37467 Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
37468 }
37469 MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
37470 MESSAGE_INTERVAL_DATA::ID => {
37471 Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
37472 }
37473 MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
37474 MISSION_CLEAR_ALL_DATA::ID => {
37475 Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
37476 }
37477 MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
37478 MISSION_CURRENT_DATA::ID => {
37479 Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
37480 }
37481 MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
37482 MISSION_ITEM_INT_DATA::ID => {
37483 Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
37484 }
37485 MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37486 MISSION_ITEM_REACHED_DATA::default(),
37487 )),
37488 MISSION_REQUEST_DATA::ID => {
37489 Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
37490 }
37491 MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37492 MISSION_REQUEST_INT_DATA::default(),
37493 )),
37494 MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37495 MISSION_REQUEST_LIST_DATA::default(),
37496 )),
37497 MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37498 MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
37499 )),
37500 MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37501 MISSION_SET_CURRENT_DATA::default(),
37502 )),
37503 MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37504 MISSION_WRITE_PARTIAL_LIST_DATA::default(),
37505 )),
37506 MOUNT_ORIENTATION_DATA::ID => {
37507 Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
37508 }
37509 NAMED_VALUE_FLOAT_DATA::ID => {
37510 Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
37511 }
37512 NAMED_VALUE_INT_DATA::ID => {
37513 Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
37514 }
37515 NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37516 NAV_CONTROLLER_OUTPUT_DATA::default(),
37517 )),
37518 OBSTACLE_DISTANCE_DATA::ID => {
37519 Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
37520 }
37521 ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
37522 ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37523 ONBOARD_COMPUTER_STATUS_DATA::default(),
37524 )),
37525 OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37526 OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
37527 )),
37528 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37529 OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
37530 )),
37531 OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37532 OPEN_DRONE_ID_BASIC_ID_DATA::default(),
37533 )),
37534 OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37535 OPEN_DRONE_ID_LOCATION_DATA::default(),
37536 )),
37537 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37538 OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
37539 )),
37540 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37541 OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
37542 )),
37543 OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37544 OPEN_DRONE_ID_SELF_ID_DATA::default(),
37545 )),
37546 OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37547 OPEN_DRONE_ID_SYSTEM_DATA::default(),
37548 )),
37549 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37550 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
37551 )),
37552 OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
37553 OPTICAL_FLOW_RAD_DATA::ID => {
37554 Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
37555 }
37556 ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37557 ORBIT_EXECUTION_STATUS_DATA::default(),
37558 )),
37559 PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
37560 PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37561 PARAM_EXT_REQUEST_LIST_DATA::default(),
37562 )),
37563 PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37564 PARAM_EXT_REQUEST_READ_DATA::default(),
37565 )),
37566 PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
37567 PARAM_EXT_VALUE_DATA::ID => {
37568 Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
37569 }
37570 PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
37571 PARAM_REQUEST_LIST_DATA::ID => {
37572 Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
37573 }
37574 PARAM_REQUEST_READ_DATA::ID => {
37575 Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
37576 }
37577 PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
37578 PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
37579 PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
37580 PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
37581 PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
37582 POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37583 POSITION_TARGET_GLOBAL_INT_DATA::default(),
37584 )),
37585 POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37586 POSITION_TARGET_LOCAL_NED_DATA::default(),
37587 )),
37588 POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
37589 PROTOCOL_VERSION_DATA::ID => {
37590 Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
37591 }
37592 RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
37593 RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
37594 RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
37595 RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
37596 RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
37597 RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37598 RC_CHANNELS_OVERRIDE_DATA::default(),
37599 )),
37600 RC_CHANNELS_RAW_DATA::ID => {
37601 Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
37602 }
37603 RC_CHANNELS_SCALED_DATA::ID => {
37604 Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
37605 }
37606 REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37607 REQUEST_DATA_STREAM_DATA::default(),
37608 )),
37609 REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
37610 RESOURCE_REQUEST_DATA::ID => {
37611 Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
37612 }
37613 RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37614 RESPONSE_EVENT_ERROR_DATA::default(),
37615 )),
37616 SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37617 SAFETY_ALLOWED_AREA_DATA::default(),
37618 )),
37619 SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37620 SAFETY_SET_ALLOWED_AREA_DATA::default(),
37621 )),
37622 SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
37623 SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
37624 SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
37625 SCALED_PRESSURE_DATA::ID => {
37626 Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
37627 }
37628 SCALED_PRESSURE2_DATA::ID => {
37629 Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
37630 }
37631 SCALED_PRESSURE3_DATA::ID => {
37632 Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
37633 }
37634 SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
37635 SERVO_OUTPUT_RAW_DATA::ID => {
37636 Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
37637 }
37638 SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
37639 SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37640 SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
37641 )),
37642 SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37643 SET_ATTITUDE_TARGET_DATA::default(),
37644 )),
37645 SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37646 SET_GPS_GLOBAL_ORIGIN_DATA::default(),
37647 )),
37648 SET_HOME_POSITION_DATA::ID => {
37649 Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
37650 }
37651 SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
37652 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37653 SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
37654 )),
37655 SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37656 SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
37657 )),
37658 SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
37659 SMART_BATTERY_INFO_DATA::ID => {
37660 Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
37661 }
37662 STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
37663 STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37664 STORAGE_INFORMATION_DATA::default(),
37665 )),
37666 SUPPORTED_TUNES_DATA::ID => {
37667 Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
37668 }
37669 SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
37670 SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
37671 TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
37672 TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
37673 TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
37674 TERRAIN_REQUEST_DATA::ID => {
37675 Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
37676 }
37677 TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
37678 TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37679 TIME_ESTIMATE_TO_TARGET_DATA::default(),
37680 )),
37681 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37682 Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37683 TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
37684 ))
37685 }
37686 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37687 Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37688 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
37689 ))
37690 }
37691 TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
37692 UAVCAN_NODE_INFO_DATA::ID => {
37693 Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
37694 }
37695 UAVCAN_NODE_STATUS_DATA::ID => {
37696 Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
37697 }
37698 UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37699 UTM_GLOBAL_POSITION_DATA::default(),
37700 )),
37701 V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
37702 VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
37703 VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
37704 VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37705 VICON_POSITION_ESTIMATE_DATA::default(),
37706 )),
37707 VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37708 VIDEO_STREAM_INFORMATION_DATA::default(),
37709 )),
37710 VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37711 VIDEO_STREAM_STATUS_DATA::default(),
37712 )),
37713 VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37714 VISION_POSITION_ESTIMATE_DATA::default(),
37715 )),
37716 VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37717 VISION_SPEED_ESTIMATE_DATA::default(),
37718 )),
37719 WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
37720 WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
37721 WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
37722 WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
37723 _ => None,
37724 }
37725 }
37726 #[cfg(feature = "arbitrary")]
37727 fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
37728 match id {
37729 ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37730 ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37731 )),
37732 ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37733 ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
37734 )),
37735 ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
37736 AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
37737 ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
37738 ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
37739 ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37740 ATTITUDE_QUATERNION_DATA::random(rng),
37741 )),
37742 ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37743 ATTITUDE_QUATERNION_COV_DATA::random(rng),
37744 )),
37745 ATTITUDE_TARGET_DATA::ID => {
37746 Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
37747 }
37748 ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
37749 AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
37750 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37751 Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37752 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
37753 ))
37754 }
37755 AUTOPILOT_VERSION_DATA::ID => {
37756 Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
37757 }
37758 AVAILABLE_MODES_DATA::ID => {
37759 Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
37760 }
37761 AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37762 AVAILABLE_MODES_MONITOR_DATA::random(rng),
37763 )),
37764 BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
37765 BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
37766 BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
37767 CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37768 CAMERA_CAPTURE_STATUS_DATA::random(rng),
37769 )),
37770 CAMERA_FOV_STATUS_DATA::ID => {
37771 Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
37772 }
37773 CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37774 CAMERA_IMAGE_CAPTURED_DATA::random(rng),
37775 )),
37776 CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
37777 CAMERA_INFORMATION_DATA::random(rng),
37778 )),
37779 CAMERA_SETTINGS_DATA::ID => {
37780 Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
37781 }
37782 CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37783 CAMERA_THERMAL_RANGE_DATA::random(rng),
37784 )),
37785 CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37786 CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
37787 )),
37788 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37789 CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
37790 )),
37791 CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
37792 CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
37793 CAN_FILTER_MODIFY_DATA::ID => {
37794 Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
37795 }
37796 CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
37797 CELLULAR_CONFIG_DATA::ID => {
37798 Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
37799 }
37800 CELLULAR_STATUS_DATA::ID => {
37801 Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
37802 }
37803 CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37804 CHANGE_OPERATOR_CONTROL_DATA::random(rng),
37805 )),
37806 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37807 CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
37808 )),
37809 COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
37810 COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
37811 COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
37812 COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
37813 COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
37814 COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37815 COMPONENT_INFORMATION_DATA::random(rng),
37816 )),
37817 COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37818 COMPONENT_INFORMATION_BASIC_DATA::random(rng),
37819 )),
37820 COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
37821 COMPONENT_METADATA_DATA::random(rng),
37822 )),
37823 CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37824 CONTROL_SYSTEM_STATE_DATA::random(rng),
37825 )),
37826 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
37827 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::random(rng),
37828 )),
37829 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
37830 Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
37831 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::random(rng),
37832 ))
37833 }
37834 CUBEPILOT_RAW_RC_DATA::ID => {
37835 Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::random(rng)))
37836 }
37837 CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37838 CURRENT_EVENT_SEQUENCE_DATA::random(rng),
37839 )),
37840 CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
37841 DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
37842 DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37843 DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
37844 )),
37845 DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
37846 DEBUG_FLOAT_ARRAY_DATA::ID => {
37847 Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
37848 }
37849 DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
37850 DISTANCE_SENSOR_DATA::ID => {
37851 Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
37852 }
37853 EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
37854 ENCAPSULATED_DATA_DATA::ID => {
37855 Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
37856 }
37857 ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
37858 ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
37859 ESTIMATOR_STATUS_DATA::ID => {
37860 Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
37861 }
37862 EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
37863 EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
37864 EXTENDED_SYS_STATE_DATA::random(rng),
37865 )),
37866 FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
37867 FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37868 FILE_TRANSFER_PROTOCOL_DATA::random(rng),
37869 )),
37870 FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
37871 FLIGHT_INFORMATION_DATA::random(rng),
37872 )),
37873 FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
37874 FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
37875 GENERATOR_STATUS_DATA::ID => {
37876 Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
37877 }
37878 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37879 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
37880 )),
37881 GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37882 GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
37883 )),
37884 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37885 GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
37886 )),
37887 GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37888 GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
37889 )),
37890 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37891 GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
37892 )),
37893 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37894 Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37895 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
37896 ))
37897 }
37898 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37899 GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
37900 )),
37901 GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37902 GIMBAL_MANAGER_STATUS_DATA::random(rng),
37903 )),
37904 GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37905 GLOBAL_POSITION_INT_DATA::random(rng),
37906 )),
37907 GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37908 GLOBAL_POSITION_INT_COV_DATA::random(rng),
37909 )),
37910 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37911 Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37912 GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
37913 ))
37914 }
37915 GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
37916 GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
37917 GPS_GLOBAL_ORIGIN_DATA::ID => {
37918 Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
37919 }
37920 GPS_INJECT_DATA_DATA::ID => {
37921 Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
37922 }
37923 GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
37924 GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
37925 GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
37926 GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
37927 GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
37928 HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
37929 HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::random(rng))),
37930 HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
37931 Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
37932 HERELINK_VIDEO_STREAM_INFORMATION_DATA::random(rng),
37933 ))
37934 }
37935 HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
37936 HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
37937 HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
37938 HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37939 HIL_ACTUATOR_CONTROLS_DATA::random(rng),
37940 )),
37941 HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
37942 HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
37943 HIL_OPTICAL_FLOW_DATA::ID => {
37944 Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
37945 }
37946 HIL_RC_INPUTS_RAW_DATA::ID => {
37947 Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
37948 }
37949 HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
37950 HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
37951 HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37952 HIL_STATE_QUATERNION_DATA::random(rng),
37953 )),
37954 HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
37955 HYGROMETER_SENSOR_DATA::ID => {
37956 Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
37957 }
37958 ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
37959 ILLUMINATOR_STATUS_DATA::random(rng),
37960 )),
37961 ISBD_LINK_STATUS_DATA::ID => {
37962 Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
37963 }
37964 LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
37965 LINK_NODE_STATUS_DATA::ID => {
37966 Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
37967 }
37968 LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
37969 LOCAL_POSITION_NED_DATA::random(rng),
37970 )),
37971 LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37972 LOCAL_POSITION_NED_COV_DATA::random(rng),
37973 )),
37974 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37975 Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37976 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
37977 ))
37978 }
37979 LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
37980 LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
37981 LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
37982 LOGGING_DATA_ACKED_DATA::random(rng),
37983 )),
37984 LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
37985 LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
37986 LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
37987 LOG_REQUEST_DATA_DATA::ID => {
37988 Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
37989 }
37990 LOG_REQUEST_END_DATA::ID => {
37991 Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
37992 }
37993 LOG_REQUEST_LIST_DATA::ID => {
37994 Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
37995 }
37996 MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
37997 MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
37998 MANUAL_SETPOINT_DATA::ID => {
37999 Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
38000 }
38001 MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
38002 MESSAGE_INTERVAL_DATA::ID => {
38003 Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
38004 }
38005 MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
38006 MISSION_CLEAR_ALL_DATA::ID => {
38007 Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
38008 }
38009 MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
38010 MISSION_CURRENT_DATA::ID => {
38011 Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
38012 }
38013 MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
38014 MISSION_ITEM_INT_DATA::ID => {
38015 Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
38016 }
38017 MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
38018 MISSION_ITEM_REACHED_DATA::random(rng),
38019 )),
38020 MISSION_REQUEST_DATA::ID => {
38021 Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
38022 }
38023 MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
38024 MISSION_REQUEST_INT_DATA::random(rng),
38025 )),
38026 MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
38027 MISSION_REQUEST_LIST_DATA::random(rng),
38028 )),
38029 MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
38030 MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
38031 )),
38032 MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
38033 MISSION_SET_CURRENT_DATA::random(rng),
38034 )),
38035 MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
38036 MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
38037 )),
38038 MOUNT_ORIENTATION_DATA::ID => {
38039 Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
38040 }
38041 NAMED_VALUE_FLOAT_DATA::ID => {
38042 Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
38043 }
38044 NAMED_VALUE_INT_DATA::ID => {
38045 Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
38046 }
38047 NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
38048 NAV_CONTROLLER_OUTPUT_DATA::random(rng),
38049 )),
38050 OBSTACLE_DISTANCE_DATA::ID => {
38051 Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
38052 }
38053 ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
38054 ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
38055 ONBOARD_COMPUTER_STATUS_DATA::random(rng),
38056 )),
38057 OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
38058 OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
38059 )),
38060 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
38061 OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
38062 )),
38063 OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
38064 OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
38065 )),
38066 OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
38067 OPEN_DRONE_ID_LOCATION_DATA::random(rng),
38068 )),
38069 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
38070 OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
38071 )),
38072 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
38073 OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
38074 )),
38075 OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
38076 OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
38077 )),
38078 OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
38079 OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
38080 )),
38081 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
38082 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
38083 )),
38084 OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
38085 OPTICAL_FLOW_RAD_DATA::ID => {
38086 Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
38087 }
38088 ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
38089 ORBIT_EXECUTION_STATUS_DATA::random(rng),
38090 )),
38091 PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
38092 PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
38093 PARAM_EXT_REQUEST_LIST_DATA::random(rng),
38094 )),
38095 PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
38096 PARAM_EXT_REQUEST_READ_DATA::random(rng),
38097 )),
38098 PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
38099 PARAM_EXT_VALUE_DATA::ID => {
38100 Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
38101 }
38102 PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
38103 PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
38104 PARAM_REQUEST_LIST_DATA::random(rng),
38105 )),
38106 PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
38107 PARAM_REQUEST_READ_DATA::random(rng),
38108 )),
38109 PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
38110 PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
38111 PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
38112 PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
38113 PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
38114 POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
38115 POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
38116 )),
38117 POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
38118 POSITION_TARGET_LOCAL_NED_DATA::random(rng),
38119 )),
38120 POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
38121 PROTOCOL_VERSION_DATA::ID => {
38122 Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
38123 }
38124 RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
38125 RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
38126 RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
38127 RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
38128 RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
38129 RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
38130 RC_CHANNELS_OVERRIDE_DATA::random(rng),
38131 )),
38132 RC_CHANNELS_RAW_DATA::ID => {
38133 Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
38134 }
38135 RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
38136 RC_CHANNELS_SCALED_DATA::random(rng),
38137 )),
38138 REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
38139 REQUEST_DATA_STREAM_DATA::random(rng),
38140 )),
38141 REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
38142 RESOURCE_REQUEST_DATA::ID => {
38143 Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
38144 }
38145 RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
38146 RESPONSE_EVENT_ERROR_DATA::random(rng),
38147 )),
38148 SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
38149 SAFETY_ALLOWED_AREA_DATA::random(rng),
38150 )),
38151 SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
38152 SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
38153 )),
38154 SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
38155 SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
38156 SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
38157 SCALED_PRESSURE_DATA::ID => {
38158 Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
38159 }
38160 SCALED_PRESSURE2_DATA::ID => {
38161 Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
38162 }
38163 SCALED_PRESSURE3_DATA::ID => {
38164 Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
38165 }
38166 SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
38167 SERVO_OUTPUT_RAW_DATA::ID => {
38168 Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
38169 }
38170 SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
38171 SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
38172 SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
38173 )),
38174 SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
38175 SET_ATTITUDE_TARGET_DATA::random(rng),
38176 )),
38177 SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
38178 SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
38179 )),
38180 SET_HOME_POSITION_DATA::ID => {
38181 Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
38182 }
38183 SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
38184 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
38185 SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
38186 )),
38187 SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
38188 SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
38189 )),
38190 SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
38191 SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
38192 SMART_BATTERY_INFO_DATA::random(rng),
38193 )),
38194 STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
38195 STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
38196 STORAGE_INFORMATION_DATA::random(rng),
38197 )),
38198 SUPPORTED_TUNES_DATA::ID => {
38199 Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
38200 }
38201 SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
38202 SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
38203 TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
38204 TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
38205 TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
38206 TERRAIN_REQUEST_DATA::ID => {
38207 Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
38208 }
38209 TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
38210 TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
38211 TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
38212 )),
38213 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38214 Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
38215 TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
38216 ))
38217 }
38218 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38219 Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
38220 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
38221 ))
38222 }
38223 TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
38224 UAVCAN_NODE_INFO_DATA::ID => {
38225 Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
38226 }
38227 UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
38228 UAVCAN_NODE_STATUS_DATA::random(rng),
38229 )),
38230 UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
38231 UTM_GLOBAL_POSITION_DATA::random(rng),
38232 )),
38233 V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
38234 VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
38235 VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
38236 VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
38237 VICON_POSITION_ESTIMATE_DATA::random(rng),
38238 )),
38239 VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
38240 VIDEO_STREAM_INFORMATION_DATA::random(rng),
38241 )),
38242 VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
38243 VIDEO_STREAM_STATUS_DATA::random(rng),
38244 )),
38245 VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
38246 VISION_POSITION_ESTIMATE_DATA::random(rng),
38247 )),
38248 VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
38249 VISION_SPEED_ESTIMATE_DATA::random(rng),
38250 )),
38251 WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
38252 WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
38253 WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
38254 WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
38255 _ => None,
38256 }
38257 }
38258 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38259 match self {
38260 Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38261 Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
38262 Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
38263 Self::AIS_VESSEL(body) => body.ser(version, bytes),
38264 Self::ALTITUDE(body) => body.ser(version, bytes),
38265 Self::ATTITUDE(body) => body.ser(version, bytes),
38266 Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
38267 Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
38268 Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
38269 Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
38270 Self::AUTH_KEY(body) => body.ser(version, bytes),
38271 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
38272 Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
38273 Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
38274 Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
38275 Self::BATTERY_INFO(body) => body.ser(version, bytes),
38276 Self::BATTERY_STATUS(body) => body.ser(version, bytes),
38277 Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
38278 Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
38279 Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
38280 Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
38281 Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
38282 Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
38283 Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
38284 Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
38285 Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
38286 Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
38287 Self::CANFD_FRAME(body) => body.ser(version, bytes),
38288 Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
38289 Self::CAN_FRAME(body) => body.ser(version, bytes),
38290 Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
38291 Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
38292 Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
38293 Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
38294 Self::COLLISION(body) => body.ser(version, bytes),
38295 Self::COMMAND_ACK(body) => body.ser(version, bytes),
38296 Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
38297 Self::COMMAND_INT(body) => body.ser(version, bytes),
38298 Self::COMMAND_LONG(body) => body.ser(version, bytes),
38299 Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
38300 Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
38301 Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
38302 Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
38303 Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(body) => body.ser(version, bytes),
38304 Self::CUBEPILOT_FIRMWARE_UPDATE_START(body) => body.ser(version, bytes),
38305 Self::CUBEPILOT_RAW_RC(body) => body.ser(version, bytes),
38306 Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
38307 Self::CURRENT_MODE(body) => body.ser(version, bytes),
38308 Self::DATA_STREAM(body) => body.ser(version, bytes),
38309 Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
38310 Self::DEBUG(body) => body.ser(version, bytes),
38311 Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
38312 Self::DEBUG_VECT(body) => body.ser(version, bytes),
38313 Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
38314 Self::EFI_STATUS(body) => body.ser(version, bytes),
38315 Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
38316 Self::ESC_INFO(body) => body.ser(version, bytes),
38317 Self::ESC_STATUS(body) => body.ser(version, bytes),
38318 Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
38319 Self::EVENT(body) => body.ser(version, bytes),
38320 Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
38321 Self::FENCE_STATUS(body) => body.ser(version, bytes),
38322 Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
38323 Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
38324 Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
38325 Self::FUEL_STATUS(body) => body.ser(version, bytes),
38326 Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
38327 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
38328 Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
38329 Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
38330 Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
38331 Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
38332 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
38333 Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
38334 Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
38335 Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
38336 Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
38337 Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38338 Self::GPS2_RAW(body) => body.ser(version, bytes),
38339 Self::GPS2_RTK(body) => body.ser(version, bytes),
38340 Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38341 Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
38342 Self::GPS_INPUT(body) => body.ser(version, bytes),
38343 Self::GPS_RAW_INT(body) => body.ser(version, bytes),
38344 Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
38345 Self::GPS_RTK(body) => body.ser(version, bytes),
38346 Self::GPS_STATUS(body) => body.ser(version, bytes),
38347 Self::HEARTBEAT(body) => body.ser(version, bytes),
38348 Self::HERELINK_TELEM(body) => body.ser(version, bytes),
38349 Self::HERELINK_VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
38350 Self::HIGHRES_IMU(body) => body.ser(version, bytes),
38351 Self::HIGH_LATENCY(body) => body.ser(version, bytes),
38352 Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
38353 Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
38354 Self::HIL_CONTROLS(body) => body.ser(version, bytes),
38355 Self::HIL_GPS(body) => body.ser(version, bytes),
38356 Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
38357 Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
38358 Self::HIL_SENSOR(body) => body.ser(version, bytes),
38359 Self::HIL_STATE(body) => body.ser(version, bytes),
38360 Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
38361 Self::HOME_POSITION(body) => body.ser(version, bytes),
38362 Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
38363 Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
38364 Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
38365 Self::LANDING_TARGET(body) => body.ser(version, bytes),
38366 Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
38367 Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
38368 Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
38369 Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
38370 Self::LOGGING_ACK(body) => body.ser(version, bytes),
38371 Self::LOGGING_DATA(body) => body.ser(version, bytes),
38372 Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
38373 Self::LOG_DATA(body) => body.ser(version, bytes),
38374 Self::LOG_ENTRY(body) => body.ser(version, bytes),
38375 Self::LOG_ERASE(body) => body.ser(version, bytes),
38376 Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
38377 Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
38378 Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
38379 Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
38380 Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
38381 Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
38382 Self::MEMORY_VECT(body) => body.ser(version, bytes),
38383 Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
38384 Self::MISSION_ACK(body) => body.ser(version, bytes),
38385 Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
38386 Self::MISSION_COUNT(body) => body.ser(version, bytes),
38387 Self::MISSION_CURRENT(body) => body.ser(version, bytes),
38388 Self::MISSION_ITEM(body) => body.ser(version, bytes),
38389 Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
38390 Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
38391 Self::MISSION_REQUEST(body) => body.ser(version, bytes),
38392 Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
38393 Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
38394 Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
38395 Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
38396 Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
38397 Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
38398 Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
38399 Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
38400 Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
38401 Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
38402 Self::ODOMETRY(body) => body.ser(version, bytes),
38403 Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
38404 Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
38405 Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
38406 Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
38407 Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
38408 Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
38409 Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
38410 Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
38411 Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
38412 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
38413 Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
38414 Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
38415 Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
38416 Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
38417 Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
38418 Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
38419 Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
38420 Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
38421 Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
38422 Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
38423 Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
38424 Self::PARAM_SET(body) => body.ser(version, bytes),
38425 Self::PARAM_VALUE(body) => body.ser(version, bytes),
38426 Self::PING(body) => body.ser(version, bytes),
38427 Self::PLAY_TUNE(body) => body.ser(version, bytes),
38428 Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
38429 Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38430 Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38431 Self::POWER_STATUS(body) => body.ser(version, bytes),
38432 Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
38433 Self::RADIO_STATUS(body) => body.ser(version, bytes),
38434 Self::RAW_IMU(body) => body.ser(version, bytes),
38435 Self::RAW_PRESSURE(body) => body.ser(version, bytes),
38436 Self::RAW_RPM(body) => body.ser(version, bytes),
38437 Self::RC_CHANNELS(body) => body.ser(version, bytes),
38438 Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
38439 Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
38440 Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
38441 Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
38442 Self::REQUEST_EVENT(body) => body.ser(version, bytes),
38443 Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
38444 Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
38445 Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
38446 Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
38447 Self::SCALED_IMU(body) => body.ser(version, bytes),
38448 Self::SCALED_IMU2(body) => body.ser(version, bytes),
38449 Self::SCALED_IMU3(body) => body.ser(version, bytes),
38450 Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
38451 Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
38452 Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
38453 Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
38454 Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
38455 Self::SETUP_SIGNING(body) => body.ser(version, bytes),
38456 Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38457 Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
38458 Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38459 Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
38460 Self::SET_MODE(body) => body.ser(version, bytes),
38461 Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38462 Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38463 Self::SIM_STATE(body) => body.ser(version, bytes),
38464 Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
38465 Self::STATUSTEXT(body) => body.ser(version, bytes),
38466 Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
38467 Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
38468 Self::SYSTEM_TIME(body) => body.ser(version, bytes),
38469 Self::SYS_STATUS(body) => body.ser(version, bytes),
38470 Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
38471 Self::TERRAIN_DATA(body) => body.ser(version, bytes),
38472 Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
38473 Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
38474 Self::TIMESYNC(body) => body.ser(version, bytes),
38475 Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
38476 Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
38477 Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
38478 Self::TUNNEL(body) => body.ser(version, bytes),
38479 Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
38480 Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
38481 Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
38482 Self::V2_EXTENSION(body) => body.ser(version, bytes),
38483 Self::VFR_HUD(body) => body.ser(version, bytes),
38484 Self::VIBRATION(body) => body.ser(version, bytes),
38485 Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38486 Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
38487 Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
38488 Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38489 Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
38490 Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
38491 Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
38492 Self::WINCH_STATUS(body) => body.ser(version, bytes),
38493 Self::WIND_COV(body) => body.ser(version, bytes),
38494 }
38495 }
38496 fn extra_crc(id: u32) -> u8 {
38497 match id {
38498 ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38499 ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
38500 ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
38501 AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
38502 ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
38503 ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
38504 ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
38505 ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
38506 ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
38507 ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
38508 AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
38509 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38510 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
38511 }
38512 AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
38513 AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
38514 AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
38515 BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
38516 BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
38517 BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
38518 CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
38519 CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
38520 CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
38521 CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
38522 CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
38523 CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
38524 CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
38525 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
38526 CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
38527 CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
38528 CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
38529 CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
38530 CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
38531 CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
38532 CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
38533 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
38534 COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
38535 COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
38536 COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
38537 COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
38538 COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
38539 COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
38540 COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
38541 COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
38542 CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
38543 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
38544 CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::EXTRA_CRC
38545 }
38546 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
38547 CUBEPILOT_FIRMWARE_UPDATE_START_DATA::EXTRA_CRC
38548 }
38549 CUBEPILOT_RAW_RC_DATA::ID => CUBEPILOT_RAW_RC_DATA::EXTRA_CRC,
38550 CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
38551 CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
38552 DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
38553 DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
38554 DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
38555 DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
38556 DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
38557 DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
38558 EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
38559 ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
38560 ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
38561 ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
38562 ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
38563 EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
38564 EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
38565 FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
38566 FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
38567 FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
38568 FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
38569 FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
38570 GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
38571 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
38572 GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
38573 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
38574 GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
38575 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
38576 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38577 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
38578 }
38579 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
38580 GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
38581 GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
38582 GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
38583 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38584 GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
38585 }
38586 GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
38587 GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
38588 GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38589 GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
38590 GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
38591 GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
38592 GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
38593 GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
38594 GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
38595 HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
38596 HERELINK_TELEM_DATA::ID => HERELINK_TELEM_DATA::EXTRA_CRC,
38597 HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
38598 HERELINK_VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC
38599 }
38600 HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
38601 HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
38602 HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
38603 HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
38604 HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
38605 HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
38606 HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
38607 HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
38608 HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
38609 HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
38610 HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
38611 HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
38612 HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
38613 ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
38614 ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
38615 LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
38616 LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
38617 LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
38618 LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
38619 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38620 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
38621 }
38622 LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
38623 LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
38624 LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
38625 LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
38626 LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
38627 LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
38628 LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
38629 LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
38630 LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
38631 MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
38632 MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
38633 MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
38634 MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
38635 MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
38636 MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
38637 MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
38638 MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
38639 MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
38640 MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
38641 MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
38642 MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
38643 MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
38644 MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
38645 MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
38646 MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
38647 MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
38648 MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
38649 MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
38650 NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
38651 NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
38652 NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
38653 OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
38654 ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
38655 ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
38656 OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
38657 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
38658 OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
38659 OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
38660 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
38661 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
38662 OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
38663 OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
38664 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
38665 OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
38666 OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
38667 ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
38668 PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
38669 PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
38670 PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
38671 PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
38672 PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
38673 PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
38674 PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
38675 PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
38676 PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
38677 PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
38678 PING_DATA::ID => PING_DATA::EXTRA_CRC,
38679 PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
38680 PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
38681 POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
38682 POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38683 POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
38684 PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
38685 RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
38686 RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
38687 RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
38688 RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
38689 RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
38690 RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
38691 RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
38692 RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
38693 REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
38694 REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
38695 RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
38696 RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
38697 SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
38698 SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
38699 SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
38700 SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
38701 SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
38702 SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
38703 SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
38704 SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
38705 SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
38706 SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
38707 SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
38708 SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38709 SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
38710 SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38711 SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
38712 SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
38713 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
38714 SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
38715 }
38716 SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38717 SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
38718 SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
38719 STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
38720 STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
38721 SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
38722 SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
38723 SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
38724 TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
38725 TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
38726 TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
38727 TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
38728 TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
38729 TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
38730 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38731 TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
38732 }
38733 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38734 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
38735 }
38736 TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
38737 UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
38738 UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
38739 UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
38740 V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
38741 VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
38742 VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
38743 VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38744 VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
38745 VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
38746 VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38747 VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
38748 WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
38749 WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
38750 WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
38751 WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
38752 _ => 0,
38753 }
38754 }
38755 fn target_system_id(&self) -> Option<u8> {
38756 match self {
38757 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
38758 Self::CANFD_FRAME(inner) => Some(inner.target_system),
38759 Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
38760 Self::CAN_FRAME(inner) => Some(inner.target_system),
38761 Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
38762 Self::COMMAND_ACK(inner) => Some(inner.target_system),
38763 Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
38764 Self::COMMAND_INT(inner) => Some(inner.target_system),
38765 Self::COMMAND_LONG(inner) => Some(inner.target_system),
38766 Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_system),
38767 Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_system),
38768 Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
38769 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
38770 Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
38771 Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
38772 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
38773 Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
38774 Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
38775 Self::LOGGING_ACK(inner) => Some(inner.target_system),
38776 Self::LOGGING_DATA(inner) => Some(inner.target_system),
38777 Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
38778 Self::LOG_ERASE(inner) => Some(inner.target_system),
38779 Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
38780 Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
38781 Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
38782 Self::MISSION_ACK(inner) => Some(inner.target_system),
38783 Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
38784 Self::MISSION_COUNT(inner) => Some(inner.target_system),
38785 Self::MISSION_ITEM(inner) => Some(inner.target_system),
38786 Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
38787 Self::MISSION_REQUEST(inner) => Some(inner.target_system),
38788 Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
38789 Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
38790 Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
38791 Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
38792 Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
38793 Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
38794 Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
38795 Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
38796 Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
38797 Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
38798 Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
38799 Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
38800 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
38801 Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
38802 Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
38803 Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
38804 Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
38805 Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
38806 Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
38807 Self::PARAM_SET(inner) => Some(inner.target_system),
38808 Self::PING(inner) => Some(inner.target_system),
38809 Self::PLAY_TUNE(inner) => Some(inner.target_system),
38810 Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
38811 Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
38812 Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
38813 Self::REQUEST_EVENT(inner) => Some(inner.target_system),
38814 Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
38815 Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
38816 Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
38817 Self::SETUP_SIGNING(inner) => Some(inner.target_system),
38818 Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
38819 Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
38820 Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
38821 Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
38822 Self::SET_MODE(inner) => Some(inner.target_system),
38823 Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
38824 Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
38825 Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
38826 Self::TIMESYNC(inner) => Some(inner.target_system),
38827 Self::TUNNEL(inner) => Some(inner.target_system),
38828 Self::V2_EXTENSION(inner) => Some(inner.target_system),
38829 _ => None,
38830 }
38831 }
38832 fn target_component_id(&self) -> Option<u8> {
38833 match self {
38834 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
38835 Self::CANFD_FRAME(inner) => Some(inner.target_component),
38836 Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
38837 Self::CAN_FRAME(inner) => Some(inner.target_component),
38838 Self::COMMAND_ACK(inner) => Some(inner.target_component),
38839 Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
38840 Self::COMMAND_INT(inner) => Some(inner.target_component),
38841 Self::COMMAND_LONG(inner) => Some(inner.target_component),
38842 Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_component),
38843 Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_component),
38844 Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
38845 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
38846 Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
38847 Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
38848 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
38849 Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
38850 Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
38851 Self::LOGGING_ACK(inner) => Some(inner.target_component),
38852 Self::LOGGING_DATA(inner) => Some(inner.target_component),
38853 Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
38854 Self::LOG_ERASE(inner) => Some(inner.target_component),
38855 Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
38856 Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
38857 Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
38858 Self::MISSION_ACK(inner) => Some(inner.target_component),
38859 Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
38860 Self::MISSION_COUNT(inner) => Some(inner.target_component),
38861 Self::MISSION_ITEM(inner) => Some(inner.target_component),
38862 Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
38863 Self::MISSION_REQUEST(inner) => Some(inner.target_component),
38864 Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
38865 Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
38866 Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
38867 Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
38868 Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
38869 Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
38870 Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
38871 Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
38872 Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
38873 Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
38874 Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
38875 Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
38876 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
38877 Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
38878 Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
38879 Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
38880 Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
38881 Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
38882 Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
38883 Self::PARAM_SET(inner) => Some(inner.target_component),
38884 Self::PING(inner) => Some(inner.target_component),
38885 Self::PLAY_TUNE(inner) => Some(inner.target_component),
38886 Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
38887 Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
38888 Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
38889 Self::REQUEST_EVENT(inner) => Some(inner.target_component),
38890 Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
38891 Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
38892 Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
38893 Self::SETUP_SIGNING(inner) => Some(inner.target_component),
38894 Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
38895 Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
38896 Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
38897 Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
38898 Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
38899 Self::TIMESYNC(inner) => Some(inner.target_component),
38900 Self::TUNNEL(inner) => Some(inner.target_component),
38901 Self::V2_EXTENSION(inner) => Some(inner.target_component),
38902 _ => None,
38903 }
38904 }
38905}